Add office photos
Employer?
Claim Account for FREE

Google

4.4
based on 1.8k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

400+ Gates Unitta India Company Interview Questions and Answers

Updated 20 Jan 2025
Popular Designations
Q1. Painter's Partition Problem

Given an array/list of length ‘N’, where the array/list represents the boards and each element of the given array/list represents the length of each board. Some ‘K’ numbers of painter...read more

Add your answer
Q2. Special Numbers

You are given an integer, ‘MAXVAL’. Your task is to determine the total number of special numbers present in the range, 1 to ‘MAXVAL’.

Note:
A special number is a number, which when rotated 180 d...read more
Add your answer
Q3. Shopping Spree

Preeti has decided to go to the Grand Mall to buy some stuff for her father’s birthday. On reaching the place, she found a fascinating shop that has an unlimited quantity of each item they sell. T...read more

Add your answer
Q4. Chocolate Problem

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the t...read more

Add your answer
Discover Gates Unitta India Company interview dos and don'ts from real experiences
Q5. Running Median

You are given a stream of 'N' integers. For every 'i-th' integer added to the running list of integers, print the resulting median.

Input Format :
The fi...read more
Add your answer
Q6. Minimum and Maximum Cost to buy N Candies

Ram went to a specialty candy store in Ninjaland which has 'N' candies with different costs.

The Candy shop gives a special offer to its customers. A customer can buy a ...read more

Add your answer
Are these interview questions helpful?
Q7. Longest Palindromic Substring

You are given a string (STR) of length N.

Your task is to find the longest palindromic substring. If there is more than one palindromic substring with the maximum length, return the...read more

Add your answer

Q8. Say you have three tables WORK, USERS, MANAGERS WORK - work_id - user_id - how_much USERS - user_id - team MANAGERS - manager_id - team If I am a manager, write a select statement to retrieve the work of all us...

read more
Ans.

Write a select statement to retrieve work of all users who belong to my team.

  • Join USERS and WORK tables on user_id

  • Join MANAGERS and USERS tables on team

  • Filter by manager_id

Add your answer
Share interview questions and help millions of jobseekers 🌟
Q9. Min Steps to one using DP

You are given a positive integer 'N’. Your task is to find and return the minimum number of steps that 'N' has to take to get reduced to 1.

You can perform any one of the following 3 st...read more

Add your answer
Q10. Minimize the Maximum

You are given an array of N integers and an integer K. For each array element, you are allowed to increase or decrease it by a value k. The task is to minimize the difference between the max...read more

Add your answer
Q11. Median in a stream

Given that integers are read from a data stream. Your task is to find the median of the elements read so far.

Median is the middle value in an ordered integer list. If the size of the list is ...read more

Add your answer
Q12. Count Ways To Reach The N-th Stairs

You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair. Each time you can either climb one step or two steps. You are...read more

Add your answer
Q13. Pattern Matching

You are given a pattern in the form of a string and a collection of words. Your task is to determine if the pattern string and the collection of words have the same order.

Note :
The strings are...read more
Add your answer
Q14. The Skyline Problem

You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings ...read more

Add your answer
Q15. Hotel Rooms

You are the manager of a hotel having 10 floors numbered 0-9. Each floor has 26 rooms [A-Z]. You will be given a sequence of strings of the room where ‘+’ suggests the room is booked and ‘-’ suggests...read more

Add your answer
Q16. Covid Vaccination

We are suffering from the Second wave of Covid-19. The Government is trying to increase its vaccination drives. Ninja wants to help the Government to plan an effective method to help increase v...read more

Add your answer
Q17. Alien dictionary

You have been given a sorted (lexical order) dictionary of an alien language. Write a function that finds the order of characters in the alien language. This dictionary will be given to you in t...read more

Add your answer
Q18. Ninjas's Robot

Ninja has a robot that can move in an infinite number line. The robot starts at position 0, with speed = +1. The robot moves automatically according to the sequence of instructions “A” (Accelerate...read more

Add your answer
Q19. Boyer Moore Algorithm for Pattern Searching

You are given a string ‘text’ and a string ‘pattern’, your task is to find all occurrences of pattern in the string ‘text’ and return an array of indexes of all those ...read more

Add your answer
Q20. Swap And Maximise

You are given a circular array consisting of N integers. You have to find the maximum sum of the absolute difference between adjacent elements with rearrangement of array element allowed i.e af...read more

Add your answer
Q21. Farthest Distance From Lands

You are given a binary square matrix ‘ARR’ with N rows and N columns, in which 0 represents the water and 1 represents the land.

You have to find a water cell such that its distance ...read more

Add your answer
Q22. Minimum Character Deletion

You are given a string ‘STR’. You need to find and return the minimum number of characters to be deleted from ‘STR’ so that the frequency of each character in the string becomes unique...read more

Add your answer
Q23. Bridges In A Graph

Given an undirected graph of V vertices and E edges. Your task is to find all the bridges in the given undirected graph. A bridge in any graph is defined as an edge which, when removed, makes ...read more

Add your answer

Q24. If your Wi-Fi router is not working then what you will do to fix it?

Ans.

I will troubleshoot the router by checking the power supply, resetting the router, and checking the network settings.

  • Check if the router is properly plugged in and receiving power

  • Reset the router by turning it off and on again

  • Check the network settings and make sure they are correct

  • Try connecting to the router with a different device

  • If all else fails, contact the internet service provider for assistance

View 13 more answers
Q25. Longest Palindromic Substring

Given a string ’S’ consisting of lower case English letters, you are supposed to return the longest palindromic substring of ‘S’.

Note that in case of more than one longest palindro...read more

Add your answer
Q26. Shortest alternate colored path

Consider a directed graph of ‘N’ nodes where each node is labeled from ‘0’ to ‘N - 1’. Each edge of the graph is either ‘red’ or ‘blue’ colored. The graph may contain self-edges o...read more

Add your answer
Q27. Spell Checker

You are given a list of strings, ‘DICTIONARY[]’ that represents the correct spelling of words and a query string ‘QUERY’ that may have incorrect spelling. You have to check whether the spelling of ...read more

Add your answer
Q28. Sum of LCM

You are given an integer ‘N’ , calculate and print the sum of :

LCM(1,N) + LCM(2,N) + .. + LCM(N,N) 

where LCM(i,n) denotes the Least Common Multiple of the integers ‘i’ and ‘N’.

Input Format:
The fir...read more
Add your answer
Q29. Minimum Time To Solve The Problems

There are 'N' number of subjects and the ith subject contains subject[i] number of problems. Each problem takes 1 unit of time to be solved. Also, you have 'K' friends, and you...read more

Add your answer

Q30. a / b c / / d e f g Print the nodes in the following order: a, b, c, g, f, e, d, h, i, j, k, l ,m, n, o and so on. Which all data structures are used? Can we use just 1?

Ans.

Multiple data structures are used to print nodes in a specific order. One data structure cannot be used alone.

  • The given order suggests a depth-first search traversal of a tree-like structure.

  • A stack can be used to keep track of the nodes to be visited.

  • A queue can be used to store the children of a node in the order they are visited.

  • An array can be used to store the nodes in the required order.

  • A linked list can be used to connect the nodes in the required order.

  • Using just one ...read more

Add your answer

Q31. How do you make business decisions? Followed by - Estimate number of call centre operators for uber?. Then we had a brief discussion around how to measure Maps accuracy? Why is it important? A bit of strategy w...

read more
Ans.

Business decisions are made by analyzing data, considering goals and objectives, and evaluating potential risks and benefits.

  • Gather and analyze relevant data

  • Consider company goals and objectives

  • Evaluate potential risks and benefits

  • Consult with stakeholders and experts

  • Use frameworks and models to guide decision-making

  • Continuously monitor and evaluate decisions for effectiveness

View 3 more answers
Q32. Aptitude Question

Alok has three daughters. His friend Shyam wants to know the ages of his daughters. Alok gives him first hint.

1) The product of their ages is 72.

Shyam says this is not enough information Alok g...read more

Add your answer
Q33. Majority Element - II

You are given an array/list 'ARR' of integers of length ‘N’. You are supposed to find all the elements that occur strictly more than floor(N/3) times in the given array/list.

Input Format ...read more
Add your answer

Q34. If you had an opportunity to design the Google Suggest system, please let us know how you would approach it and how you would execute the plan in terms of settings up systems like(data stores or databases, inde...

read more
Ans.

Designing Google Suggest system

  • I would start by analyzing user search patterns and frequently searched keywords

  • Then, I would create a database of these keywords and their associated search results

  • I would use indexing services to quickly retrieve relevant results for each keyword

  • I would also implement machine learning algorithms to improve the accuracy of suggestions over time

Add your answer

Q35. Given n pens and n tops, each pen (and each top) having a size different than the other and each pen fitting exactly one top, find the largest pen using minimum number of comparisons. A comparison involves pick...

read more
Ans.

Find largest pen using minimum comparisons with tops.

  • Divide pens into two groups and compare largest pen from each group with largest top.

  • Repeat the process with the group containing the largest pen until only one pen is left.

  • The remaining pen is the largest pen.

  • Total number of comparisons required is 2n-3.

Add your answer

Q36. How do you find out if a number is a power of 2? And how do you know if it is an odd number? Write code in the language of your choice

Ans.

Check if a number is a power of 2 and odd.

  • To check if a number is a power of 2, use bitwise AND operator with the number and its predecessor. If the result is 0, it is a power of 2.

  • To check if a number is odd, use modulus operator with 2. If the result is 1, it is odd.

  • Example code in Python:

  • def is_power_of_two(num):

  • return num & (num - 1) == 0

  • def is_odd(num):

  • return num % 2 == 1

View 2 more answers
Q37. Remove K Corner Elements

Given an array ‘arr’ consisting of ‘N’ integer elements. You have to remove ‘K’ elements from the beginning or end of the array. Return the maximum possible sum of the remaining array e...read more

Add your answer
Q38. Shortest path in an unweighted graph

The city of Ninjaland is analogous to the unweighted graph. The city has ‘N’ houses numbered from 1 to ‘N’ respectively and are connected by M bidirectional roads. If a road ...read more

Add your answer

Q39. Given a source array of integers with possible duplicates and a target integer, write algorithm to find out 2 numbers in source array whose sum is equal to target integer

Ans.

Algorithm to find 2 numbers in an array whose sum is equal to a target integer

  • Use a hash table to store the difference between target and each element in the array

  • Iterate through the array and check if the current element exists in the hash table

  • Return the pair of elements that sum up to the target integer

View 1 answer
Q40. Connect N Ropes With Minimum Cost

You have been given 'N' ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to sum of their lengths. We need to conn...read more

Add your answer

Q41. Given n dice, each of 'a' sides and a sum b, return the number of ways in which the sum b can be obtained. How can you reduce the time complexity and space complexity?

Ans.

Given n dice with 'a' sides and sum b, return no. of ways to obtain b. Optimize time and space complexity.

  • Use dynamic programming to reduce time complexity

  • Create a 2D array to store the number of ways to obtain each sum for each number of dice

  • Use rolling arrays to optimize space complexity

  • Example: n=2, a=6, b=7 -> 6 ways to obtain sum 7

  • Example: n=3, a=4, b=8 -> 21 ways to obtain sum 8

Add your answer
Q42. Find all anagrams

You have been given a string STR and a non-empty string PTR. Your task is to find all the starting indices of PTR’s anagram in STR.

An anagram of a string is another string which contains the s...read more

Add your answer

Q43. Which is faster: finding an item in a hashtable or in a sorted list? And Why?

Ans.

Hashtable is faster for finding an item than a sorted list.

  • Hashtable has constant time complexity O(1) for finding an item.

  • Sorted list has logarithmic time complexity O(log n) for finding an item.

  • Hashtable uses hashing to directly access the item's location.

  • Sorted list requires binary search to find the item's location.

  • Hashtable is ideal for large datasets with frequent lookups.

  • Sorted list is ideal for datasets that require frequent insertions and deletions.

View 2 more answers

Q44. Given 2 machines, each having 64 GB RAM, containing all integers (8 byte), sort the entire 128 GB data. You may assume a small amount of additional RAM. Extend this to sort data stored in 1000 machines

Ans.

Sort 128 GB data on 2 machines with 64 GB RAM each. Extend to 1000 machines.

  • Use external sorting algorithm like merge sort or quick sort

  • Divide data into smaller chunks and sort them individually

  • Merge sorted chunks using additional RAM

  • For 1000 machines, use distributed sorting algorithms like MapReduce or Hadoop

  • Ensure data consistency and fault tolerance in distributed sorting

Add your answer

Q45. Which technical skills are required to program efficiently ?

Ans.

The technical skills required to program efficiently include programming languages, algorithms, data structures, debugging, and problem-solving.

  • Proficiency in programming languages such as Java, Python, C++, etc.

  • Knowledge of algorithms and their efficiency, including sorting, searching, and graph algorithms.

  • Understanding of data structures like arrays, linked lists, stacks, queues, trees, and hash tables.

  • Ability to debug and troubleshoot code to identify and fix errors.

  • Strong...read more

View 7 more answers
Q46. Dijkstra's shortest path

You have been given an undirected graph of ‘V’ vertices (labeled 0,1,..., V-1) and ‘E’ edges. Each edge connecting two nodes (‘X’,’Y’) will have a weight denoting the distance between no...read more

Add your answer

Q47. You are in the middle of a quarter (month) and are looking at huge deficit on achievement vs target, how do you approach( think from behavioural as well as business action perspective) Give an example where you...

read more
Ans.

In the face of a deficit in achieving sales targets, I would approach the situation by analyzing the reasons behind the shortfall and taking appropriate actions to address them.

  • Identify the reasons for the deficit by analyzing sales data, market trends, and customer feedback.

  • Develop a plan to address the identified issues, such as revising sales strategies, offering incentives to the sales team, or targeting new customer segments.

  • Communicate the revised plan to the sales team...read more

View 2 more answers

Q48. 1. There is a train that passes the following path: L / \ ... L / \ ... L Each junction tells us the path it is going to take. Once the train passes it'll change the switch at the function. We dont care after t...

read more
Ans.

Determining the state of switches/junctions after N trains have passed through them.

  • Create an array to represent the state of each switch/junction

  • Iterate through each train and update the state of the corresponding switch/junction

  • Use a loop to simulate the passing of trains and updating of switches/junctions

  • Return the final state of the switches/junctions

Add your answer

Q49. You are given 2 eggs. You have access to a 100-story building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor. Both eg...

read more
Ans.

To find the highest floor an egg can be dropped without breaking using 2 identical eggs and a 100-story building.

  • Start by dropping the first egg from the 50th floor, if it breaks, use the second egg to test floors below 50, if it doesn't break, test floors above 50.

  • If the first egg doesn't break, drop it from a higher floor and repeat the process until it breaks.

  • The highest floor tested without breaking the egg is the answer.

  • This problem can be solved using binary search algo...read more

Add your answer
Q50. Check If The String Is A Palindrome

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols ...read more

Add your answer
Q51. Minimum Removals

You have been given an array/list "ARR" consisting of 'N' integers. You have also given an integer 'K'.

Your task is to find the minimum number of elements that should be removed from "ARR" (pos...read more

Add your answer
Q52. Search In Rotated Sorted Array

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4,...read more

Add your answer
Q53. Maximum sum path from the leaf to root

You are given a binary tree of 'N' nodes.

Your task is to find the path from the leaf node to the root node which has the maximum path sum among all the root to leaf paths...read more

Add your answer

Q54. In google adwords there are about 30 million ads from 42 lanuages . What will I do review the ads and reject ads that do not comply with specific rules

Ans.

Reviewing 30 million ads from 42 languages in Google AdWords and rejecting non-compliant ads requires a systematic approach.

  • Create a set of specific rules and guidelines for ad compliance

  • Use automated tools to filter out ads that violate the rules

  • Assign a team of reviewers to manually check the remaining ads

  • Ensure that the reviewers are fluent in the languages of the ads they are reviewing

  • Regularly update the rules and guidelines to keep up with changes in the industry

  • Provide...read more

Add your answer
Q55. Binary strings with no consecutive 1s

You have been given an integer K.

Your task is to generate all binary strings of length K such that there are no consecutive 1s in the string. This means that the binary str...read more

Add your answer

Q56. If I were a Product Manager of google maps, how would I improve the location accuracy. Why is it important and what could be the solutions? How would I rank solutions?

Ans.

Improving location accuracy for Google Maps as a Product Manager

  • Collect more data from GPS and Wi-Fi signals

  • Use machine learning algorithms to improve accuracy

  • Partner with mobile network providers to access cell tower data

  • Implement crowd-sourced data collection from users

  • Prioritize solutions based on cost, feasibility, and impact on user experience

View 1 answer
Q57. Convert binary tree to mirror tree

Given a binary tree, convert this binary tree into its mirror tree.

A binary tree is a tree in which each parent node has at most two children.

Mirror of a Tree: Mirror of a Bi...read more

Add your answer
Q58. Ways To Make Coin Change

You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more

Add your answer
Q59. Distance between two nodes of a Tree

Given a binary tree and the value of two nodes, find the distance between the given two nodes of the Binary Tree.

Distance between two nodes is defined as the minimum number ...read more

Add your answer
Q60. Count distinct Bitwise OR of all subarrays

You are given an array consisting of N positive integers, your task is to count the number of distinct possible values that can be obtained by taking the bitwise OR of ...read more

Add your answer
Q61. Ninja and the bulbs

Ninja owns an electronic shop. In the shop, Ninja has 'N' bulbs. To sell these bulbs, Ninja has to check if they are of good quality. To check bulbs, Ninja uses a unique technique.

In this te...read more

Add your answer
Q62. Wildcard Queries

You are given a dictionary ‘D’ consisting of ‘N’ words. Each word of the dictionary is of fixed size ‘L’ and contains only lowercase English alphabets.

Now you have to answer ‘Q’ queries, in eac...read more

Add your answer
Q63. Intersection of Linked List

You are given two Singly Linked List of integers, which are merging at some node of a third linked list.

Your task is to find the data of the node at which merging starts. If there is...read more

Add your answer
Q64. Maximum In Sliding Windows Of Size K

Given an array/list of integers of length ‘N’, there is a sliding window of size ‘K’ which moves from the beginning of the array, to the very end. You can only see the ‘K’ nu...read more

Add your answer

Q65. Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The vi...

read more
Add your answer

Q66. How would you change the format of all the phone numbers in 1000 static html pages?

Ans.

Use a script to iterate through each HTML page, locate phone numbers, and update their format.

  • Write a script using a programming language like Python or JavaScript to iterate through each HTML page

  • Use regular expressions to locate phone numbers in the pages

  • Update the format of the phone numbers as needed (e.g. adding country code, changing separators)

  • Save the updated HTML pages with the new phone number format

Add your answer

Q67. If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)? If you look at a clock and the time is...

read more
Ans.

Probability and clock angle calculation

  • Use probability formula to calculate probability of observing a car in 10 minutes

  • To calculate clock angle, use the formula: |(30*H) - (11/2)*M| where H is hour and M is minute

  • Answer to clock angle question is 7.5 degrees

Add your answer
Q68. Subset OR

You are given an array/list ‘ARR’ of ‘N’ positive integers’. Your task is to find out the size of the smallest subset with the maximum OR possible. That means that among all subsets that have OR of its...read more

Add your answer
Q69. BFS in Graph

You are given an undirected and disconnected graph G(V, E) having V vertices numbered from 0 to V-1 and E edges. Your task is to print its BFS traversal starting from the 0th vertex.

BFS or Breadth-...read more

Add your answer
Q70. Consecutive elements

You are given an array arr of N non-negative integers, you need to return true if the array elements consist of consecutive numbers otherwise return false.

For Example: If the given array is...read more

Add your answer
Q71. Sum of Bit Difference Among all Pairs

Given an array of size ‘N’ containing integer elements and let the elements of the given array be 'ARR1', 'ARR2',…..,' ARRN'. You need to find the sum of bit differences amo...read more

Add your answer
Q72. Maximum Subarray Sum

You are given an array/list ARR consisting of N integers. Your task is to find the maximum possible sum of a non-empty subarray(contagious) of this array.

Note: An array C is a subarray of a...read more

Add your answer

Q73. What are some of the most popular Data interchange formats when using APIs

Ans.

JSON and XML are the most popular data interchange formats when using APIs.

  • JSON (JavaScript Object Notation) is a lightweight format that is easy to read and write. It is widely used in web APIs.

  • XML (Extensible Markup Language) is a more complex format that is also widely used in web APIs.

  • Other formats include CSV (Comma Separated Values), YAML (YAML Ain't Markup Language), and Protocol Buffers.

View 1 answer
Q74. DBMS Question

RDBMS vs Non RDBMS

Why SQL is very popular?

How do you get second largest salary

What is stored procedure?

Add your answer
Q75. Delete Leaf Nodes with Value X

You are given a binary tree, in which the data present in the nodes are integers. You are also given an integer X.

Your task is to delete all the leaf nodes with value X. In the pr...read more

Add your answer
Q76. Technical Questions

How to align a text in a larger web page context?

OOPS Concepts

Add your answer
Q77. Maximum Time

You are given a string that represents time in the format hh:mm. Some of the digits are blank (represented by ‘?’). Fill in ‘?’ such that the time represented by this string is the maximum possible....read more

Add your answer

Q78. Tell about ur strength? Tell about long term goal?

Ans.

My strength lies in my problem-solving skills and ability to work well in a team. My long term goal is to become a lead developer and contribute to innovative projects.

  • Strong problem-solving skills

  • Effective team player

  • Long term goal of becoming a lead developer

  • Contribute to innovative projects

View 4 more answers

Q79. In a country in which people only want boys, every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of...

read more
Ans.

In a country where families keep having children until they have a boy, what is the proportion of boys to girls?

  • The proportion of boys to girls is not 50:50

  • The probability of having a boy or a girl is always 50%

  • The more girls a family has, the higher the probability of having a boy in the next pregnancy

  • The proportion of boys to girls will depend on the number of families and their fertility rates

Add your answer
Q80. OS Questions

Sleeping barber problem.

Disk scheduling algos

Process Scheduling algos

Turnaround time

Threads

Add your answer

Q81. How will improve the revenue of the cafeteria of the office.

Ans.

By introducing new menu items, optimizing pricing strategy, and improving the overall dining experience.

  • Conduct a survey to understand the preferences of employees

  • Introduce healthy and affordable meal options

  • Offer discounts for bulk orders or loyalty programs

  • Partner with local vendors to source fresh ingredients

  • Improve the ambiance and seating arrangements

  • Implement online ordering and delivery services

Add your answer
Q82. Validate BST

Given a binary tree with N number of nodes, check if that input tree is BST (Binary Search Tree) or not. If yes, return true, return false otherwise.

A binary search tree (BST) is a binary tree data...read more

Add your answer
Q83. Delete Node In A Linked List

You are given a Singly Linked List of integers and a reference to the node to be deleted. Every node of the Linked List has a unique value written on it. Your task is to delete that ...read more

Add your answer

Q84. Given a string of L, M, R, where L means turn to left, R means turn to right and M means take 1 step forward where you are directed. Now suppose you start from origin, and one letter in the string is wrong, tha...

read more
Ans.

The maximum distance that can be reached if one instruction in a string of L, M, R is wrong.

  • The maximum distance can be reached by following the correct instructions and then taking the opposite direction of the wrong instruction.

  • For example, if the string is 'LMRM', the correct path would be 'LMR' and then taking a step in the opposite direction of 'M'.

  • Calculate the distance by summing up the steps taken in the correct path and subtracting the step taken in the wrong directi...read more

View 1 answer
Q85. Count Palindrome Words in A String

You are given a string S of words. Your task is to find the number of palindrome words in the given string S. A word is called palindrome, if it reads the same backwards as for...read more

Add your answer
Q86. Rat In A Maze

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a squar...read more

Add your answer

Q87. Which data structure will be better suited chain type data.

Ans.

Linked List is the best-suited data structure for chain type data.

  • Linked List is a dynamic data structure that can grow or shrink during runtime.

  • It allows efficient insertion and deletion operations.

  • Each node in the linked list contains a reference to the next node.

  • Examples of chain type data include a list of songs in a playlist or a list of tasks in a to-do list.

View 2 more answers

Q88. Name some popular APIs for each of these Social Commerce service(llike a photo service etc)

Ans.

Popular APIs for Social Commerce services

  • Facebook Graph API for social media integration

  • Instagram API for photo sharing and tagging

  • Twitter API for real-time updates and customer engagement

  • Pinterest API for product discovery and sharing

  • Google Maps API for location-based services

  • PayPal API for secure payment processing

View 1 answer
Q89. Sudoku

You are given a 9x9 sudoku. Your task is to solve sudoku and return the solution.

A sudoku is a puzzle in which players insert the numbers one to nine into a grid consisting of nine squares subdivided int...read more

Add your answer

Q90. Why is Java a platform independent language?

Ans.

Java is platform independent due to its bytecode and JVM implementation.

  • Java code is compiled into bytecode, which can run on any platform with a Java Virtual Machine (JVM)

  • JVM acts as an interpreter, translating bytecode into machine code specific to the underlying platform

  • This allows Java programs to be written once and run anywhere, without the need for recompilation

View 1 answer

Q91. What is Java? Features of Java? Ans-java is a high level programing language and it is platform independent. Java is a collection of objects It was developed by sun Microsystem.There are lot of application,webs...

read more
Ans.

Java is a high-level, object-oriented programming language that is platform-independent and widely used for developing applications, websites, and games.

  • Developed by Sun Microsystems

  • Collection of objects

  • High performance and multi-threaded

  • Used for developing Android apps, enterprise applications, and web applications

View 1 answer
Q92. Technical Question

below are giving versions and there commit msg arrange them ascending order and merge all commit messages with same versions.1.0.0* Initial release—————1.0.2* feature 2xx updated—————1.0.0* In...read more

Add your answer

Q93. You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seco...

read more
Ans.

Stay calm, grab onto the side of the blender and wait for someone to rescue you.

  • Stay calm and don't panic

  • Grab onto the side of the blender

  • Wait for someone to rescue you

  • Try to make noise to attract attention

Add your answer

Q94. You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than ...

read more
Ans.

A pirate must divide 100 gold coins among 5 pirates, but if fewer than half agree, he gets killed. How can he maximize his share and live?

  • The top pirate should offer 1 coin to the lowest ranked pirate, and keep 99 for himself.

  • The second-lowest ranked pirate will vote for this plan, as he will get nothing if the top pirate is killed.

  • The third-lowest ranked pirate will also vote for this plan, as he will get nothing if the second-lowest ranked pirate's plan is chosen.

  • The top pi...read more

Add your answer

Q95. What are Static Binding and Dynamic Binding?

Ans.

Static binding is resolved at compile time, while dynamic binding is resolved at runtime.

  • Static binding is also known as early binding, where the method call is resolved at compile time based on the type of the object.

  • Dynamic binding is also known as late binding, where the method call is resolved at runtime based on the actual type of the object.

  • Example of static binding: method overloading.

  • Example of dynamic binding: method overriding.

Add your answer
Q96. House Robber

Mr. X is a professional robber planning to rob houses along a street. Each house has a certain amount of money hidden. All houses along this street are arranged in a circle. That means the first hou...read more

Add your answer

Q97. In a singly linked list if there is a pointer S on the first element and pointer L is on the last element. Then which operation will take more time based on the length of the list? 1) Adding element at the firs...

read more
Ans.

Adding an element at the end of a singly linked list takes more time based on the length of the list.

  • Adding an element at the end requires traversing the entire list to reach the last element.

  • Adding an element at the first only requires updating the next pointer of the new element and the head pointer.

  • Exchanging the first two elements and deleting the element from the end can be done in constant time.

Add your answer

Q98. You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you find the ball that is heavier by using a balance and only two weighing?

Ans.

Use a balance to find the heavier ball among eight balls with only two weighings.

  • Divide the eight balls into three groups of three, three, and two balls.

  • Weigh the two groups of three balls against each other.

  • If the two groups weigh the same, the heavier ball is in the group of two balls.

  • If one group of three balls weighs more, select two balls from that group and weigh them against each other.

  • If they weigh the same, the heavier ball is the remaining one. If they don't, the he...read more

Add your answer

Q99. How to go about identifying the target segment? Call out the key Features? What would be the MVP plans?

Ans.

Identifying target segment involves analyzing customer needs and preferences to create a profile. Key features should align with customer needs.

  • Conduct market research to understand customer needs and preferences

  • Analyze customer data to create a customer profile

  • Identify common characteristics among customers to create target segments

  • Align key features with customer needs and preferences

  • Create MVP plans based on target segment and key features

  • Continuously gather feedback to re...read more

Add your answer

Q100. input: { type: file, filename: in.txt } mode: strict output: { type: service, server: { hostname: myserver.com } person: { age: 12 } } How would you represent data of this kind in memory ?

Ans.

The data can be represented in memory using a combination of data structures like objects and arrays.

  • Use objects to represent the input, output, server, and person data

  • Use arrays to store multiple values like filenames or hostnames

  • Use key-value pairs to store specific information like age or type

Add your answer
1
2
3
4
5

More about working at Google

Top Rated Large Company - 2024
Top Rated Internet/Product Company - 2024
HQ - Mountain View,California, United States
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Gates Unitta India Company

based on 465 interviews in the last 1 year
Interview experience
4.3
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.0
 • 536 Interview Questions
3.7
 • 333 Interview Questions
3.8
 • 210 Interview Questions
3.7
 • 151 Interview Questions
3.8
 • 137 Interview Questions
4.1
 • 132 Interview Questions
View all
Top Google Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter