# Tag Archives: Ola Cabs

An employee works for an employer for 7 days. The employer has a gold rod of 7 units. How does the employer pay to the… Read More
Given a string of lowercase ASCII characters, find all distinct continuous palindromic sub-strings of it. Examples: Input: str = "abaaa" Output: Below are 5 palindrome… Read More
First Round Written Test 1) Implement Stack Operations. Also maintain count of Largest Integer present in Stack at any given point of Time. 2) Implement… Read More
I attended the interview for OLA Cabs in Bangalore for SDE position recently. Here is my interview experience. Round 1 Written Coding Test (1 hour)… Read More
Given an array that represents elements of arithmetic progression in order. One element is missing in the progression, find the missing number.  Examples:  Input: arr[]… Read More
We have already discussed 2 different ways to clone a linked list. In this post, one more simple method to clone a linked list is… Read More
I recently encountered with a question in an interview at e-commerce company. The interviewer asked the following question:There is BST given with root node with… Read More
Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance… Read More
Given a Binary Tree, print left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from… Read More
Given two strings where first string may contain wild card characters and second string is a normal string. Write a function that returns true if… Read More
The cost of a stock on each day is given in an array, find the max profit that you can make by buying and… Read More
Design a Data Structure for the following operations. The data structure should be efficient enough to accommodate the operations according to their frequency. 1) findMin()… Read More
Given a boolean 2D matrix, find the number of islands. A group of connected 1s forms an island. For example, the below matrix contains… Read More
Given an array where every element occurs three times, except one element which occurs only once. Find the element that occurs once. The expected… Read More
Given a partially filled 9×9 2D array ‘grid[9][9]’, the goal is to assign digits (from 1 to 9) to the empty cells so that every… Read More