Filter interviews by
posted on 27 Jan 2017
I was interviewed in Dec 2016.
Find the maximum sum of a rectangle in a 2D matrix.
Use Kadane's algorithm to find the maximum sum subarray in each row.
Iterate over all possible combinations of rows and find the maximum sum rectangle.
Keep track of the maximum sum and the coordinates of the rectangle.
Implement 3 stacks using one array with optimized space and time complexity.
Divide the array into three equal parts to represent each stack.
Keep track of the top index of each stack separately.
When pushing an element, increment the top index of the respective stack and store the element.
When popping an element, retrieve the element from the top index of the respective stack and decrement the top index.
Handle stack over
Dutch National Flag algorithm can be used to sort an array of 0, 1, and 2 in O(n) time complexity and O(1) space complexity.
Initialize three pointers: low, mid, and high.
Iterate through the array and swap elements based on their values.
Increment low and mid pointers when encountering 0.
Increment mid pointer when encountering 1.
Decrement high pointer when encountering 2.
Top trending discussions
I applied via Campus Placement and was interviewed before Apr 2021. There were 2 interview rounds.
2 Coding Ques + Aptitude
posted on 3 Dec 2015
posted on 15 May 2017
I was interviewed before May 2016.
Program to calculate sum of level order tree
Traverse the tree level by level using BFS
Add the values of each level and return the sum
Use a queue to store the nodes at each level
Handle edge cases like empty tree or null root
posted on 23 Jan 2017
I was interviewed before Jan 2016.
posted on 28 Aug 2015
I applied via Campus Placement
posted on 20 May 2017
I was interviewed in Dec 2016.
Convert an expression to post-fix notation.
Start with an empty stack.
Scan the expression from left to right.
If the scanned character is an operand, output it.
If the scanned character is an operator, pop two operands from stack, output them in post-fix notation and push the result back.
Repeat until the end of expression.
Find the maximum continuous sum in an array of integers.
Use Kadane's algorithm to find the maximum subarray sum in linear time complexity.
Initialize two variables, one for current maximum sum and another for overall maximum sum.
Iterate through the array and update the variables accordingly.
Example: For array [-2, 1, -3, 4, -1, 2, 1, -5, 4], the maximum continuous sum is 6 (from index 3 to 6).
posted on 19 May 2017
I was interviewed in Aug 2016.
Find the length of longest increasing subsequence in an array.
Use dynamic programming to solve the problem efficiently.
Maintain an array to store the length of longest increasing subsequence ending at each index.
Traverse the array and update the array for each index.
Return the maximum value in the array as the length of longest increasing subsequence.
Find maximum of every window of size K in an array
Iterate through the array and maintain a deque of indices of elements in the current window
Remove indices from the front of the deque if they are outside the current window
Remove indices from the back of the deque if their corresponding elements are smaller than the current element
The front of the deque will always contain the index of the maximum element in the current
Implement binary search in a semi-infinite array.
Start with the first element and keep doubling the index until the target element is less than the current element.
Perform binary search on the subarray from the last doubled index to the current index.
If the target element is not found, repeat the process by doubling the last index and searching again.
Handle edge cases where the target element is at the first index or n
posted on 24 May 2017
I was interviewed in Jul 2016.
Some of the top questions asked at the Ola Cabs SDE (Software Development Engineer) interview -
based on 2 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