Upload Button Icon Add office photos

Ola Cabs

Compare button icon Compare button icon Compare

Filter interviews by

Clear (1)

Ola Cabs Software Developer Interview Questions, Process, and Tips

Updated 24 Oct 2024

Top Ola Cabs Software Developer Interview Questions and Answers

  • Q1. Problem: Permutations of a String Given a string STR consisting of lowercase English letters, your task is to return all permutations of the given string in lexicographi ...read more
  • Q2. Count Leaf Nodes in a Binary Tree 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 e ...read more
  • Q3. Diagonal Traversal of a Binary Tree Problem Statement Given a binary tree, your task is to determine the diagonal traversal of the tree. Example: Input: 1 2 3 4 -1 5 6 - ...read more
View all 11 questions

Ola Cabs Software Developer Interview Experiences

5 interviews found

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(2 Questions)

  • Q1. What is Closure
  • Ans. 

    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...

  • Answered by AI
  • Q2. Flat nested array
Round 2 - Technical 

(2 Questions)

  • Q1. Machine coding questions
  • Q2. Das based questions
Round 3 - HR 

(2 Questions)

  • Q1. Simple questions
  • Q2. Simple questions one on one

Software Developer Interview Questions & Answers

user image BIDISHA MISRA

posted on 19 Oct 2024

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

One coding and other mcqs on CS concepts

Software Developer Interview Questions Asked at Other Companies

asked in Amazon
Q1. Maximum Subarray Sum Problem Statement Given an array of integers ... read more
asked in Amazon
Q2. Minimum Number of Platforms Needed Problem Statement You are give ... read more
asked in Rakuten
Q3. Merge Two Sorted Arrays Problem Statement Given two sorted intege ... read more
asked in Cognizant
Q4. Nth Fibonacci Number Problem Statement Calculate the Nth term in ... read more
Q5. Find Duplicate in Array Problem Statement You are provided with a ... read more

I was interviewed in May 2021.

Round 1 - Video Call 

(2 Questions)

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.

  • Q1. 

    Problem: Permutations of a String

    Given a string STR consisting of lowercase English letters, your task is to return all permutations of the given string in lexicographically increasing order.

    Explanatio...

  • Ans. 

    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.

  • Answered by AI
  • Q2. 

    Find the Kth Row of Pascal's Triangle Problem Statement

    Given a non-negative integer 'K', determine the Kth row of Pascal’s Triangle.

    Example:

    Input:
    K = 2
    Output:
    1 1
    Input:
    K = 4
    Output:
    1 4 6 ...
  • Ans. 

    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.

  • Answered by AI
Round 2 - Video Call 

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 3 - HR 

Round duration - 60 minutes
Round difficulty - Easy

This was the last round. This was HM round followed by the HR round.

Interview Preparation Tips

Eligibility criteriaWork Experience of 1+ yearsOla interview preparation:Topics to prepare for the interview - Data Structures, OOPS, Algorithms, Dynamic Programming, Aptitude, Computer Netwroks and System ArchitectureTime required to prepare for the interview - 3 MonthsInterview preparation tips for other job seekers

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.

Application resume tips for other job seekers

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

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed before May 2021.

Round 1 - Coding Test 

(3 Questions)

Round duration - 90 minutes
Round difficulty - Medium

It was in the morning, where there were 3 questions to answer.

  • Q1. 

    Number of Islands Problem Statement

    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...

  • Ans. 

    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...

  • Answered by AI
  • Q2. 

    Missing Numbers Problem Statement

    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...

  • Ans. 

    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.

  • Answered by AI
  • Q3. 

    Count Leaf Nodes in a Binary Tree

    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,...

  • Ans. 

    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.

  • Answered by AI
Round 2 - Face to Face 

(1 Question)

Round duration - 20 minutes
Round difficulty - Medium

It was a system design round.

  • Q1. Can you describe the system design of the OLA app?
  • Ans. 

    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

  • Answered by AI
Round 3 - Face to Face 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

It was a DS Algo round.

  • Q1. 

    Diagonal Traversal of a Binary Tree Problem Statement

    Given a binary tree, your task is to determine the diagonal traversal of the tree.

    Example:

    Input:
    1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1
    Output:
    ...
  • Ans. 

    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.

  • Answered by AI
  • Q2. 

    Minimum Number Of Taps To Water Garden Problem Statement

    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,...

  • Ans. 

    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.

  • Answered by AI
Round 4 - HR 

Round duration - 15 minutes
Round difficulty - Medium

HR Round

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in BangaloreEligibility criteriaAbove 7 CGPAOla interview preparation:Topics to prepare for the interview - Data Structures, OOPS, Algorithms, Puzzles, Binary Search, Dynamic Programming.Time required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Go through standard problems
Tip 2 : You should know about everything you have written on your resume

Application resume tips for other job seekers

Tip 1 : Keep it short not more than 1 page.
Tip 2 : Write more about figures and technicality on your resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

Ola Cabs interview questions for designations

 Software Developer Intern

 (1)

 Developer

 (1)

 Software Engineer

 (4)

 Software Development Engineer

 (2)

 Senior Software Engineer 2

 (1)

 Developer Operations

 (2)

 SDE (Software Development Engineer)

 (1)

 Software Development Engineer Intern

 (1)

I was interviewed before Sep 2020.

Round 1 - Telephonic Call 

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 2 - Coding Test 

(1 Question)

Round duration - 120 minutes
Round difficulty - Easy

This round was Online Test on Hackerrank for 120 minutes, it contained 3 questions.

  • Q1. 

    LRU Cache Design Question

    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...

  • Ans. 

    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...

  • Answered by AI
Round 3 - Face to Face 

Round duration - 60 minutes
Round difficulty - Easy

This round was face to face Interview at Ola Campus and lasted for 1 hour.

Round 4 - Face to Face 

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 5 - Face to Face 

(1 Question)

Round duration - 30 minutes
Round difficulty - Easy

Only a question of System Design was asked

  • Q1. Design a toll booth system for Ola cabs and explain the necessary functions and data structures used in it.
  • Ans. 

    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...

  • Answered by AI
Round 6 - HR 

Round duration - 30 minutes
Round difficulty - Easy

Very general HR questions were asked

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in New DelhiOla interview preparation:Topics to prepare for the interview - DSA, Operating systems, Databases, System design, Networking Time required to prepare for the interview - 4.5 monthsInterview preparation tips for other job seekers

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.

Application resume tips for other job seekers

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)

Final outcome of the interviewSelected

Skills evaluated in this interview

Get interview-ready with Top Ola Cabs Interview Questions

Interview questions from similar companies

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 180 minutes
Round difficulty - Medium

The online test consisted of 2 coding questions, 30 aptitude MCQs, 30 behavioral MCQs and 10 code snippets to debug. The coding questions were of medium level, aptitude MCQs were easy and the code snippets to debug was also of easy level. Each section had a time constraint.

  • Q1. 

    Merge Two Sorted Linked Lists Problem Statement

    You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.

    ...
  • Ans. 

    Merge two sorted linked lists into a single sorted linked list without using additional space beyond constant space complexity.

    • Create a dummy node to start the merged list

    • Iterate through both linked lists and compare nodes to merge them in sorted order

    • Update the next pointers accordingly

    • Handle cases where one list is empty or both lists are empty

    • Return the head of the merged linked list

  • Answered by AI
  • Q2. 

    Minimum Path Sum Problem Statement

    Consider a 2-dimensional grid 'GRID' with 'N' rows and 'M' columns in Ninjaland. Each cell in the grid has an associated cost. The goal is to determine the minimum path ...

  • Ans. 

    The Minimum Path Sum Problem involves finding the minimum sum of costs along a path from the top-left to the bottom-right of a grid.

    • Use dynamic programming to calculate the minimum path sum by considering the costs of moving down or right at each cell.

    • Initialize a 2D array to store the minimum path sum values for each cell in the grid.

    • Iterate through the grid to calculate the minimum path sum for each cell based on the...

  • Answered by AI
Round 2 - Video Call 

(4 Questions)

Round duration - 60 minutes
Round difficulty - Medium

My interview was at 9:00 am. The interview was conducted on Amazon Chime and my webcam was on. The interviewer also asked me to write the code on a document which can be edited by both me and the interviewer. The difficulty of the questions was of medium level. I was asked 3 coding questions along with 2 questions related to OOPS at the end. The interview ended with the discussion of one of my projects. The interviewer was good and also gave me hints wherever required.

  • Q1. 

    Palindrome Partitioning Problem Statement

    You are given a string S. Your task is to partition S such that every substring of the partition is a palindrome. Your objective is to return all possible palindr...

  • Ans. 

    Given a string, partition it into palindromes and return all possible configurations.

    • Use backtracking to generate all possible palindrome partitions

    • Check if each substring is a palindrome before adding it to the partition

    • Return all valid partitions as an array of strings

  • Answered by AI
  • Q2. 

    Longest Increasing Subsequence Problem Statement

    Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...

  • Ans. 

    Find the length of the longest strictly increasing subsequence in an array of integers.

    • Use dynamic programming to solve this problem efficiently.

    • Initialize an array to store the length of the longest increasing subsequence ending at each index.

    • Iterate through the array and update the length of the longest increasing subsequence for each element.

    • Return the maximum value in the array as the result.

  • Answered by AI
  • Q3. 

    Find Missing Number In String Problem Statement

    You have a sequence of consecutive nonnegative integers. By appending all integers end-to-end, you formed a string S without any separators. During this pro...

  • Ans. 

    Find the missing number in a string of consecutive nonnegative integers.

    • Iterate through the string and check for missing numbers by comparing adjacent integers

    • If a missing number is found, return it as the output

    • Handle cases where there are multiple missing numbers or the string is invalid by returning -1

  • Answered by AI
  • Q4. What are the ACID properties in DBMS?
  • Ans. 

    ACID properties in DBMS ensure data integrity and consistency.

    • Atomicity: All operations in a transaction are treated as a single unit of work, either all succeed or all fail.

    • Consistency: Database remains in a consistent state before and after the transaction.

    • Isolation: Transactions are isolated from each other until they are completed.

    • Durability: Once a transaction is committed, the changes made by it are permanent and...

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from Punjab Engineering College(Deemed To be University). Eligibility criteriaCandidate must be femaleAmazon interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, Graphs, Dynamic Programming, OOPS, Operating System, Database Management, C++,Computer Networks.Time required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : You must have a grip over Data Structures and algorithms. Your concepts must be crystal clear. Pick one coding platform and try to practice at least 7-10 coding questions everyday. I completed around 200+ questions on Leetcode, 200+ questions on Geek For Geeks and around 30-40 questions on InterviewBit. 
Tip 2 : After attempting any coding problem, analyze its time and space complexity. See, if you can further optimize your solution. You can always check the editorials and compare your solution with it.
Tip 3 : Apart from coding questions keep studying concepts of Operating Systems, databases and object oriented programming. You can always refer to Geeks For Geeks articles for it. Also, Coding Ninja's Data Structures and algorithms course in C++ helped me a lot in improving my OOPS concepts specifically.

Application resume tips for other job seekers

Tip 1 : You do not need to have a long list of projects on your resume. One good project with proper knowledge of it will do good. Similarly, do not list down several number of skills. Few skills but roper knowledge of them are enough.
Tip 2 : Do not fake anything on your resume. The interviewer gets to know about it by asking questions. If you aren't able to answer, it leaves a negative impact.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 90 minutes
Round difficulty - Easy

This was MCQ+Coding round.

  • Q1. How can you check if two strings are anagrams of each other?
  • Ans. 

    Check if two strings are anagrams by comparing the sorted versions of the strings.

    • Sort both strings and compare if they are equal.

    • Use a hashmap to store the frequency of characters in each string and compare the maps.

    • Ignore spaces and punctuation when comparing the strings.

  • Answered by AI
Round 2 - Face to Face 

Round duration - 90 minutes
Round difficulty - Easy

This was face to face interview round.

Round 3 - Face to Face 

Round duration - 90 minutes
Round difficulty - Easy

This was face to face interview round.

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from National Institute Of Technology, Silchar, Assam. I applied for the job as SDE - 1 in SiddharthnagarEligibility criteria6 CGPAAmazon interview preparation:Topics to prepare for the interview - Basic Computer Science backgroundTime required to prepare for the interview - 6 monthsInterview preparation tips for other job seekers

Tip 1 : Participate in live contests on websites like Codechef, Codeforces etc as much as possible.
Tip 2 : Practice previous interview questions from LeetCode, GeeksForGeeks.
Tip 3 : Revise Computer Science subjects like DBMS, OOPS thoroughly.

Application resume tips for other job seekers

Add projects and Internships if you have done any and add only those things which you really know.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 90 Minutes
Round difficulty - Medium

Interview started at 11:00 am. It was an online round. During the coding round I submitted optimized solution and got full acceptance of the solutions.

  • Q1. 

    Detect Cycle in a Directed Graph

    You are provided with a directed graph composed of 'N' nodes. You have a matrix called 'EDGES' with dimensions M x 2, which specifies the 'M' edges in the graph. Each edge...

  • Ans. 

    Detect cycle in a directed graph using depth-first search (DFS) algorithm.

    • Use DFS to traverse the graph and detect back edges indicating a cycle.

    • Maintain a visited array to keep track of visited nodes during traversal.

    • If a node is visited again during traversal and it is not the parent node, then a cycle exists.

    • Return true if a cycle is detected, false otherwise.

  • Answered by AI
Round 2 - Face to Face 

(1 Question)

Round duration - 80 Minutes
Round difficulty - Medium

Interview started at 10:00 am. Interview went well, I was able to connect with the interviewer and enjoyed the whole interview

  • Q1. 

    Next Smallest Palindrome Problem Statement

    Find the next smallest palindrome strictly greater than a given number 'N' represented as a string 'S'.

    Explanation:

    You are given a number in string format, a...

  • Ans. 

    Find the next smallest palindrome greater than a given number represented as a string.

    • Convert the string to an integer, find the next greater palindrome, and convert it back to a string.

    • Handle cases where the number is a palindrome or has all digits as '9'.

    • Consider both odd and even length numbers when finding the next palindrome.

  • Answered by AI
Round 3 - Face to Face 

(1 Question)

Round duration - 80 Minutes
Round difficulty - Medium

Interview started at 11:00 am. Interview went well.

  • Q1. 

    Boundary Traversal of a Binary Tree

    Given a binary tree of integers, your task is to return the boundary nodes of the tree in Anti-Clockwise direction starting from the root node.

    Input:

    The first line ...
  • Ans. 

    Return the boundary nodes of a binary tree in Anti-Clockwise direction starting from the root node.

    • Traverse the left boundary nodes in a top-down manner

    • Traverse the leaf nodes from left to right

    • Traverse the right boundary nodes in a bottom-up manner

    • Handle cases where duplicates occur in the boundary nodes

    • Implement the function without printing as printing is already managed

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaGood knowledge of Data Structures, Some great projects which are used by the usersAmazon interview preparation:Topics to prepare for the interview - Data Structures, Web development, System Design, Algorithms, Dynamic Programming, Database, OS, Networking, OOPS, DevOpsTime required to prepare for the interview - 8 monthsInterview preparation tips for other job seekers

Tip 1 : For Data Structures number of questions doesn't matter. Try to understand the logic behind them and try to apply them in creating multiple scenario's. Learn them by heart. 
Tip 2 : For Web.Development Try to learn full stack development. See which part interests you more, Increase your knowledge horizon, Always try to build a system a system considering It will be served to millions of customers. By doing this 1-2 projects will increase and cover all the major things which one should learn in their career/college.

Application resume tips for other job seekers

Tip 1 : Always try to make it a single page 
Tip 2 : Always make resume company specific. eg. Data Structures part more if you are applying for MNC's eg. Amazon, Google, DE Shaw, browserstack.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed in Oct 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 120 minutes
Round difficulty - Medium

Evening test around 5
Platform :- SHL
Environment was amazing

  • Q1. 

    Subtree of Another Tree Problem Statement

    Given two binary trees, T and S, determine whether S is a subtree of T. The tree S should have the same structure and node values as a subtree of T.

    Explanation:

    ...
  • Ans. 

    Given two binary trees T and S, determine if S is a subtree of T with the same structure and node values.

    • Check if the second tree is a subtree of the first tree by comparing their structures and node values.

    • Use a recursive approach to traverse both trees and check for equality.

    • Handle cases where one tree is null or the values do not match.

    • Return true if S is a subtree of T, false otherwise.

  • Answered by AI
  • Q2. 

    Search in a Row-wise and Column-wise Sorted Matrix Problem Statement

    You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...

  • Ans. 

    Given a sorted N*N matrix, find the position of a target integer X.

    • Iterate over each row and column to find the target integer X

    • Utilize the sorted nature of the matrix to optimize the search process

    • Return the position of X if found, else return -1 -1

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

1 Hour 
Afternoon

  • Q1. 

    Intersection of Linked List Problem

    You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.

    Your task is to determine t...

  • Ans. 

    Find the node where two linked lists merge, return -1 if no merging occurs.

    • Traverse both lists to find their lengths and the difference in lengths

    • Move the pointer of the longer list by the difference in lengths

    • Traverse both lists simultaneously until they meet at the merging point

  • Answered by AI
  • Q2. 

    Problem: Pair Sum in a Binary Search Tree

    Given a Binary Search Tree (BST) and an integer 'S', your task is to find all pairs of nodes within the BST that total to 'S' and return these pairs. If no such p...

  • Ans. 

    Find pairs of nodes in a BST that sum up to a given value 'S'.

    • Traverse the BST in-order to get a sorted list of nodes.

    • Use two pointers approach to find pairs with sum 'S'.

    • Keep track of visited nodes to avoid using the same node twice in a pair.

  • Answered by AI
Round 3 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Online Round held on Chime

  • Q1. 

    Is Binary Heap Tree Problem Statement

    You are given a binary tree of integers. Your task is to determine if it is a binary heap tree or not.

    Input:

    The first line of input contains an integer ‘T’ denoti...
  • Ans. 

    Determine if a given binary tree is a binary heap tree or not based on certain properties.

    • Check if the binary tree is a complete binary tree where every level, except the last level, is completely filled and the last level is as far left as possible.

    • Ensure that every parent node is greater than all its children nodes, forming a max-heap.

    • If any node does not have a left or right child, it should be represented as -1 in

  • Answered by AI
  • Q2. 

    Edit Distance Problem Statement

    Given two strings S and T with lengths N and M respectively, your task is to find the "Edit Distance" between these strings.

    The Edit Distance is defined as the minimum nu...

  • Ans. 

    The task is to find the minimum number of operations required to convert one string into another using delete, replace, and insert operations.

    • Use dynamic programming to solve the problem efficiently.

    • Create a 2D array to store the edit distances between substrings of the two input strings.

    • Fill up the array based on the minimum of three possible operations: insert, delete, or replace.

    • The final answer will be the value at...

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in BangaloreEligibility criteriaNo backlogsAmazon interview preparation:Topics to prepare for the interview - Data Structures, OOPS, OS, DBMS, Dynamic Programming, Trees/Graph, Tries, Hashing, Algorithms, HadoopTime required to prepare for the interview - 4.5 monthsInterview preparation tips for other job seekers

Tip 1 : 1 Programming Language
Tip 2 : Practice Data Structures with atleast 300 ques.
Tip 3 : CS Fundamental

Application resume tips for other job seekers

Tip 1 : 1 Pager
Tip 2 : Add top 3 projects in Resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed in Aug 2017.

Interview Questionnaire 

7 Questions

  • Q1. Implement Merge Sort.
  • Ans. 

    Merge Sort is a divide and conquer algorithm that sorts an array by dividing it into two halves, sorting them separately, and then merging the sorted halves.

    • Divide the array into two halves

    • Recursively sort the two halves

    • Merge the sorted halves

  • Answered by AI
  • Q2. Given a BST containing distinct integers, and a number ‘X’, find all pairs of integers in the BST whose sum is equal to ‘X’.
  • Ans. 

    Find pairs of integers in a BST whose sum is equal to a given number.

    • Traverse the BST and store the values in a hash set.

    • For each node, check if (X - node.value) exists in the hash set.

    • If yes, add the pair (node.value, X - node.value) to the result.

    • Continue traversal until all nodes are processed.

  • Answered by AI
  • Q3. Given a set of time intervals in any order, merge all overlapping intervals into one and output the result which should have only mutually exclusive intervals.
  • Ans. 

    Merge overlapping time intervals into mutually exclusive intervals.

    • Sort the intervals based on their start time.

    • Iterate through the intervals and merge overlapping intervals.

    • Output the mutually exclusive intervals.

    • Example: [(1,3), (2,6), (8,10), (15,18)] -> [(1,6), (8,10), (15,18)]

  • Answered by AI
  • Q4. What are the different types of hashing? Suggest an alternative and a better way for Linear Chaining.
  • Ans. 

    Different types of hashing and alternative for Linear Chaining

    • Different types of hashing include division, multiplication, and universal hashing

    • Alternative for Linear Chaining is Open Addressing

    • Open Addressing includes Linear Probing, Quadratic Probing, and Double Hashing

  • Answered by AI
  • Q5. Implement AVL Tree.
  • Ans. 

    An AVL tree is a self-balancing binary search tree where the heights of the left and right subtrees differ by at most one.

    • AVL tree is a binary search tree with additional balance factor for each node.

    • The balance factor is the difference between the heights of the left and right subtrees.

    • Insertion and deletion operations in AVL tree maintain the balance factor to ensure the tree remains balanced.

    • Rotations are performed ...

  • Answered by AI
  • Q6. Minimum number of squares whose sum equals to given number n.
  • Ans. 

    Find the minimum number of squares whose sum equals to a given number n.

    • Use dynamic programming to solve the problem efficiently.

    • Start with finding the square root of n and check if it is a perfect square.

    • If not, then try to find the minimum number of squares required for the remaining number.

    • Repeat the process until the remaining number becomes 0.

    • Return the minimum number of squares required for the given number n.

  • Answered by AI
  • Q7. Insertion sort for a singly linked list.
  • Ans. 

    Insertion sort for a singly linked list.

    • Traverse the list and compare each node with the previous nodes

    • If the current node is smaller, swap it with the previous node

    • Repeat until the end of the list is reached

    • Time complexity is O(n^2)

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: There were 2 coding questions (no penalty for wrong submission) and 20 Multiple Choice Questions(with negative marking). We were given 90 minutes to solve them. MCQs were based on Data Structures, OS, CN, C outputs, OOP etc.
Tips: Experience in Competitive Programming might help in solving coding questions. No constraints were mentioned and detailed Instructions related to problem were stated vaguely. So code carefully.
Duration: 1 hour 30 minutes
Total Questions: 22

Round: Technical Interview
Experience: The interviewer asked me to introduce myself and a brief introduction of the projects that I have done. She first asked me questions related to my project. After that she moved on to the data structures part.
Tips: Take your time to approach the problems and if the question is not clear ask the interviewer to explain it again.

Round: Technical Interview
Experience: The interviewer asked me about how my previous round went. After that, he asked me to introduce myself and a brief introduction of the projects that I have done. He first asked me a few questions related to my project. Then he moved on to the data structures part. In this round the interviewer gave me strict time limit for coding the solution on paper for each problem and as soon as I was done coding he gave me 2-3 minutes every time to find errors and debug my code.
Tips: Do not panic even if the interviewer sets time limit while solving problems. If the question is not clear ask the interviewer to explain it again.

College Name: The LNM Institute Of Information Technology, Jaipur

Skills evaluated in this interview

Contribute & help others!
anonymous
You can choose to be anonymous

Ola Cabs Interview FAQs

How many rounds are there in Ola Cabs Software Developer interview?
Ola Cabs interview process usually has 2 rounds. The most common rounds in the Ola Cabs interview process are Technical, Coding Test and HR.
How to prepare for Ola Cabs Software Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Ola Cabs. The most common topics and skills that interviewers at Ola Cabs expect are Automotive, Communication Protocols, Embedded Software, Ethernet and MATLAB.
What are the top questions asked in Ola Cabs Software Developer interview?

Some of the top questions asked at the Ola Cabs Software Developer interview -

  1. What is Clos...read more
  2. Machine coding questi...read more
  3. Simple questions one on ...read more

Recently Viewed

INTERVIEWS

Jio

No Interviews

SALARIES

Sciative Solutions

INTERVIEWS

Ola Cabs

No Interviews

INTERVIEWS

Amazon

No Interviews

INTERVIEWS

HyperVerge

No Interviews

SALARIES

Perch Technologies

INTERVIEWS

Fenesta Building Systems

No Interviews

INTERVIEWS

Tiger Analytics

No Interviews

SALARIES

Sciative Solutions

SALARIES

HyperVerge

Tell us how to improve this page.

Ola Cabs Software Developer Interview Process

based on 5 interviews

Interview experience

3.4
  
Average
View more
Ola Cabs Software Developer Salary
based on 80 salaries
₹8.8 L/yr - ₹26.8 L/yr
94% more than the average Software Developer Salary in India
View more details

Ola Cabs Software Developer Reviews and Ratings

based on 12 reviews

2.7/5

Rating in categories

3.5

Skill development

2.5

Work-life balance

3.0

Salary

2.5

Job security

2.6

Company culture

2.5

Promotions

3.3

Work satisfaction

Explore 12 Reviews and Ratings
Driver
748 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

CAR Driver
572 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Program Manager
247 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Assistant Manager
246 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Business Development Executive
241 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Explore more salaries
Compare Ola Cabs with

Uber

4.2
Compare

Meru cabs

3.8
Compare

Zoomcar

3.6
Compare

Rapido

3.8
Compare
Did you find this page helpful?
Yes No
write
Share an Interview