Filter interviews by
Closure is a function that captures the environment in which it was created, allowing it to access variables from that environment even after the function has finished executing.
Closure allows a function to access variables from its outer scope even after the function has finished executing.
It is created when a function is defined within another function and the inner function references variables from the outer functi...
One coding and other mcqs on CS concepts
I was interviewed in May 2021.
Round duration - 60 minutes
Round difficulty - Medium
This was coding round and was conducted on Google meet with code link shared. Their were 2 interviewers that gave questions and later ran code on sample test cases.
Given a string STR
consisting of lowercase English letters, your task is to return all permutations of the given string in lexicographically increasing order.
Return all permutations of a given string in lexicographically increasing order.
Use backtracking to generate all permutations of the string.
Sort the permutations to get them in lexicographically increasing order.
Ensure the string contains unique characters to avoid duplicate permutations.
Given a non-negative integer 'K', determine the Kth row of Pascal’s Triangle.
K = 2
1 1
K = 4
1 4 6 ...
The task is to find the Kth row of Pascal's Triangle given a non-negative integer K.
Create an array to store the elements of the Kth row of Pascal's Triangle.
Use the formula C(n, k) = C(n-1, k-1) + C(n-1, k) to calculate each element in the row.
Return the array containing the Kth row of Pascal's Triangle.
Round duration - 90 minutes
Round difficulty - Medium
This was a Machine Coding Round/LLD round followed by HLD round which was taken by Video Conferencing and Screen Sharing.
Round duration - 60 minutes
Round difficulty - Easy
This was the last round. This was HM round followed by the HR round.
Tip 1 : Solve previously asked questions. It tells you about the level of questions that the company asks. Check glass-door reviews it will help you to know what kind of questions company ask
Tip 2 : Be real during the interview and don’t show off.
Tip 3 : Prepare for theory subjects like Object-Oriented Programming System, Database Management System, Computer networks, etc.
Tip 1 : Keep your resume simple with all work experience mentioned.
Tip 2 : Any unwanted information on the resume leaves a bad impact on the interviewer.
Tip 3 : You should be prepared to explain anything that’s written on your resume.
Tip 4 : Keep it of 1 page or 2 pages only
I was interviewed before May 2021.
Round duration - 90 minutes
Round difficulty - Medium
It was in the morning, where there were 3 questions to answer.
You are provided with a 2-dimensional matrix having N
rows and M
columns, containing only 1s (land) and 0s (water). Your goal is to determine the number of islands in t...
Count the number of islands in a 2D matrix of 1s and 0s.
Use Depth First Search (DFS) or Breadth First Search (BFS) to traverse the matrix and identify connected groups of 1s.
Maintain a visited array to keep track of visited cells to avoid redundant traversal.
Increment the island count each time a new island is encountered.
Consider all eight possible directions for connectivity while traversing the matrix.
Handle edge ca...
You are provided with an array called ARR
, consisting of distinct positive integers. Your task is to identify all the numbers that fall within the range of the smallest a...
Identify missing numbers within the range of smallest and largest elements in an array.
Find the smallest and largest elements in the array.
Generate a list of numbers within this range.
Filter out the numbers present in the array.
Return the missing numbers in sorted order.
Given a binary tree, your task is to count and return the number of leaf nodes present in it.
A binary tree is a data structure where each node has at most two children,...
Count and return the number of leaf nodes in a binary tree.
Traverse the binary tree and count nodes with both left and right children as NULL.
Use recursion to traverse the tree efficiently.
Leaf nodes have no children, so check for NULL left and right children to identify them.
Round duration - 20 minutes
Round difficulty - Medium
It was a system design round.
OLA app system design involves multiple components like user interface, driver matching algorithm, payment processing, etc.
User interface for booking rides and tracking
Driver matching algorithm based on location and availability
Payment processing for seamless transactions
Real-time tracking of rides for both users and drivers
Round duration - 45 minutes
Round difficulty - Medium
It was a DS Algo round.
Given a binary tree, your task is to determine the diagonal traversal of the tree.
1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1
...
Diagonal traversal of a binary tree involves traversing nodes diagonally from top to bottom and left to right.
Traverse the tree level by level, starting from the root node.
For each level, keep track of the diagonal nodes and their children.
Use a queue to store nodes at each level and traverse them accordingly.
Example: For input 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1, the diagonal traversal is 1 3 6 2 5 4 7.
You are required to determine the minimum number of taps that need to be opened to water an entire one-dimensional garden defined along the x-axis,...
Find the minimum number of taps to water an entire garden along the x-axis.
Iterate over the taps and find the farthest point each tap can reach.
Sort the taps based on their starting points and use a greedy approach to select the taps.
Keep track of the farthest point reachable by the selected taps and the number of taps opened.
Return the minimum number of taps needed to water the entire garden or -1 if it's impossible.
Round duration - 15 minutes
Round difficulty - Medium
HR Round
Tip 1 : Go through standard problems
Tip 2 : You should know about everything you have written on your resume
Tip 1 : Keep it short not more than 1 page.
Tip 2 : Write more about figures and technicality on your resume.
Ola Cabs interview questions for designations
I was interviewed before Sep 2020.
Round duration - 45 minutes
Round difficulty - Easy
This round was telephonic round. The interview lasted for approximately 45 minutes. The interviewer asked me three coding questions. I hustled a bit on 3rd question but after a hint was able to solve it.
Round duration - 120 minutes
Round difficulty - Easy
This round was Online Test on Hackerrank for 120 minutes, it contained 3 questions.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Use a combination of hashmap and doubly linked list to implement the LRU cache.
Keep track of the least recently used item and evict it when the cache reaches its capacity.
Update the position of an item in the cache whenever it is accessed or updated.
Handle both get and put operations efficiently to main...
Round duration - 60 minutes
Round difficulty - Easy
This round was face to face Interview at Ola Campus and lasted for 1 hour.
Round duration - 35 minutes
Round difficulty - Easy
This round was again a face to face technical interview, I was just asked one question in this round.
Round duration - 30 minutes
Round difficulty - Easy
Only a question of System Design was asked
Design a toll booth system for Ola cabs with necessary functions and data structures.
Use a queue data structure to manage the order of vehicles waiting at the toll booth.
Implement functions for vehicle entry, toll calculation, and exit.
Store vehicle information such as license plate number, type of vehicle, and toll amount in a hash map.
Utilize a priority queue to handle VIP or premium customers efficiently.
Include a f...
Round duration - 30 minutes
Round difficulty - Easy
Very general HR questions were asked
Tip 1 : Be confident in the projects you have mentioned in your resume.
Tip 2 : Always discuss your approach with the interviewer first for any problem.
Tip 3 : Always start with a basic solution and then discuss further optimisations.
Tip 1 : Good projects showing your skills (Be clear in what you achieved from those projects)
Tip 2 : Internship experience at the top (It gives you an edge over others)
Get interview-ready with Top Ola Cabs Interview Questions
Top trending discussions
I applied via Campus Placement
Regex for email validation
Start with a string of characters followed by @ symbol
Followed by a string of characters and a period
End with a string of characters with a length of 2-6 characters
Allow for optional subdomains separated by periods
Disallow special characters except for . and _ in username
Print prime numbers in a given range and optimize the solution.
Use Sieve of Eratosthenes algorithm to generate prime numbers efficiently
Start with a boolean array of size n+1, mark all as true
Loop through the array and mark all multiples of each prime as false
Print all the indexes that are still marked as true
Find angle between hour and minute hand in a clock given the time.
Calculate the angle made by the hour hand with respect to 12 o'clock position
Calculate the angle made by the minute hand with respect to 12 o'clock position
Find the difference between the two angles and take the absolute value
If the angle is greater than 180 degrees, subtract it from 360 degrees to get the smaller angle
To un-hash a string, use a reverse algorithm to convert the hash back to the original string.
Create a reverse algorithm that takes the hash as input and outputs the original string
Use the same logic as the hash function but in reverse order
If the hash function used a specific algorithm, use the inverse of that algorithm to un-hash the string
Print the level order traversal of binary tree in spiral form
Perform level order traversal of the binary tree
Alternate the direction of traversal for each level
Use a stack to reverse the order of nodes in each level
Print the nodes in the order of traversal
Find the maximum element in each subarray of size k in a given array.
Iterate through the array from index 0 to n-k.
For each subarray of size k, find the maximum element.
Store the maximum elements in a separate array.
Return the array of maximum elements.
To find the Kth largest element in two sorted arrays, we can use the merge step of merge sort algorithm.
Merge the two arrays into a single sorted array using a modified merge sort algorithm.
Return the Kth element from the merged array.
Merge two sorted arrays into one sorted array with expected time complexity of (m+n).
Use a two-pointer approach to compare elements from both arrays and merge them into the first array.
Start comparing elements from the end of both arrays and place the larger element at the end of the first array.
Continue this process until all elements from the second array are merged into the first array.
based on 5 interviews
Interview experience
based on 12 reviews
Rating in categories
Driver
748
salaries
| ₹0 L/yr - ₹0 L/yr |
CAR Driver
572
salaries
| ₹0 L/yr - ₹0 L/yr |
Program Manager
247
salaries
| ₹0 L/yr - ₹0 L/yr |
Assistant Manager
246
salaries
| ₹0 L/yr - ₹0 L/yr |
Business Development Executive
241
salaries
| ₹0 L/yr - ₹0 L/yr |
Uber
Meru cabs
Zoomcar
Rapido