Upload Button Icon Add office photos

Ola Cabs

Compare button icon Compare button icon Compare

Filter interviews by

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. 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 ...read more
  • 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 e ...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 appeared for an interview 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 appeared for an interview 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)

 Software Development Engineer Intern

 (1)

 SDE (Software Development Engineer)

 (1)

I appeared for an interview 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 appeared for an interview before Jan 2021.

Round 1 - Face to Face 

(3 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

This was a typical DS/Algo where I was asked to solve two questions related to Binary Trees and write the pseudo code for both of them followed by some theoretical questions related to Operating Systems.

  • Q1. 

    K-th Largest Number in a BST

    Given a binary search tree (BST) consisting of integers and containing 'N' nodes, your task is to find and return the K-th largest element in this BST.

    If there is no K-th la...

  • Ans. 

    Find the K-th largest element in a BST.

    • Perform reverse in-order traversal of the BST to find the K-th largest element.

    • Keep track of the count of visited nodes to determine the K-th largest element.

    • Return -1 if there is no K-th largest element in the BST.

  • Answered by AI
  • Q2. 

    Is Height Balanced Binary Tree Problem Statement

    Determine if the given binary tree is height-balanced. A tree is considered height-balanced when:

    1. The left subtree is balanced.
    2. The right subtree is bala...
  • Ans. 

    Determine if a given binary tree is height-balanced by checking if left and right subtrees are balanced and their height difference is at most 1.

    • Check if the left subtree is balanced

    • Check if the right subtree is balanced

    • Calculate the height difference between the left and right subtrees

    • Return 'True' if all conditions are met, otherwise return 'False'

  • Answered by AI
  • Q3. Can you explain the concepts of Zombie Process and Orphan Process in operating systems?
  • Ans. 

    Zombie process is a terminated process that has completed execution but still has an entry in the process table. Orphan process is a process whose parent process has terminated.

    • Zombie process is created when a child process completes execution but its parent process has not yet read its exit status.

    • Zombie processes consume system resources and should be cleaned up by the parent process using wait() system call.

    • Orphan p...

  • Answered by AI
Round 2 - Face to Face 

(3 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

This was also a Data Structures and Algorithm round where I was asked to solve 3 medium to hard level problems along with their pseudo code within 60 minutes .

  • Q1. 

    Longest Substring Without Repeating Characters Problem Statement

    Given a string S of length L, determine the length of the longest substring that contains no repeating characters.

    Example:

    Input:
    "abac...
  • Ans. 

    Find the length of the longest substring without repeating characters in a given string.

    • Use a sliding window approach to keep track of the longest substring without repeating characters.

    • Use a hashmap to store the index of each character in the string.

    • Update the start index of the window when a repeating character is found.

    • Calculate the maximum length of the window as you iterate through the string.

    • Return the maximum le

  • Answered by AI
  • Q2. 

    Problem: Search In Rotated Sorted Array

    Given a sorted array that has been rotated clockwise by an unknown amount, you need to answer Q queries. Each query is represented by an integer Q[i], and you must ...

  • Ans. 

    Search for integers in a rotated sorted array efficiently.

    • Use binary search to efficiently search for integers in the rotated sorted array.

    • Handle the rotation of the array while performing binary search.

    • Return the index of the integer if found, else return -1.

  • Answered by AI
  • Q3. 

    Count Subarrays with Sum Divisible by K

    Given an array ARR and an integer K, your task is to count all subarrays whose sum is divisible by the given integer K.

    Input:

    The first line of input contains an...
  • Ans. 

    Count subarrays with sum divisible by K in an array.

    • Iterate through the array and keep track of the prefix sum modulo K.

    • Use a hashmap to store the frequency of each prefix sum modulo K.

    • For each prefix sum, increment the count by the frequency of (prefix sum - K) modulo K.

    • Handle the case when prefix sum itself is divisible by K.

    • Return the total count of subarrays with sum divisible by K.

  • Answered by AI
Round 3 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

In this round , I was asked to code a simple question related to BST . After that I was asked the internal implementation of a Hash Map where I was supposed to design a Hash Map using any of the Hashing Algorithms that I know . This was preety challenging for me but I got to learn so much from it.

  • Q1. 

    Ceil Value from BST Problem Statement

    Given a Binary Search Tree (BST) and an integer, write a function to return the ceil value of a particular key in the BST.

    The ceil of an integer is defined as the s...

  • Ans. 

    Ceil value of a key in a Binary Search Tree (BST) is found by returning the smallest integer greater than or equal to the given number.

    • Traverse the BST to find the closest value greater than or equal to the key.

    • Compare the key with the current node value and update the ceil value accordingly.

    • Recursively move to the left or right subtree based on the comparison.

    • Return the ceil value once the traversal is complete.

  • Answered by AI
  • Q2. 

    Design a Constant Time Data Structure

    Create a data structure that maintains mappings between keys and values, supporting the following operations in constant time:

    1. INSERT(key, value): Add or update t...
  • Ans. 

    Design a constant time data structure to maintain mappings between keys and values with various operations.

    • Use a hash table to achieve constant time complexity for INSERT, DELETE, SEARCH, and GET operations.

    • Keep track of the number of key-value pairs for GET_SIZE operation.

    • Check if the hash table is empty for IS_EMPTY operation.

    • Return true or false for SEARCH operation based on key existence.

    • Return the value associated...

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAFlipkart interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 4 MonthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

I appeared for an interview before Jan 2021.

Round 1 - Coding Test 

(3 Questions)

Round duration - 90 Minutes
Round difficulty - Hard

I found the online coding round of Flipkart to be quite difficult based on the constraints of the problem and their time limits. I coded the first problem quite easily but on the second and the third problem , my code could only pass a few test cases and gave TLE for most of them. Both the questions required very efficient solution and the last 5 to 10 Test Cases carried more weight than the rest so I didn't get through this round.

  • Q1. 

    Print the Kth Digit

    Given three non-negative integers N, M, and K, compute the Kth digit from the right in the number obtained from N raised to the power M (i.e., N ^ M).

    Input:

    The first line contains ...
  • Ans. 

    The task is to find the Kth digit from the right in the number obtained from N raised to the power M.

    • Iterate through the digits of N^M from right to left

    • Keep track of the position of the current digit

    • Return the digit at position K from the right

  • Answered by AI
  • Q2. 

    The Skyline Problem

    Compute the skyline of given rectangular buildings in a 2D city, eliminating hidden lines and forming the outer contour of the silhouette when viewed from a distance. Each building is ...

  • Ans. 

    Compute the skyline of given rectangular buildings in a 2D city, eliminating hidden lines and forming the outer contour of the silhouette.

    • Iterate through the buildings and create a list of critical points (x, y) where the height changes.

    • Sort the critical points based on x-coordinate and process them to form the skyline.

    • Merge consecutive horizontal segments of equal height into one to ensure no duplicates.

    • Return the fin...

  • Answered by AI
  • Q3. 

    Longest Palindromic Substring Problem Statement

    You are provided with a string STR of length N. The goal is to identify the longest palindromic substring within this string. In cases where multiple palind...

  • Ans. 

    Identify the longest palindromic substring in a given string.

    • Iterate through the string and expand around each character to find palindromes

    • Keep track of the longest palindrome found

    • Return the longest palindrome with the smallest start index

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAFlipkart interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewRejected

Skills evaluated in this interview

Interview Questionnaire 

1 Question

  • Q1. What do u want us to do fr u??
  • Ans. 

    I want you to provide me with challenging software development projects that will help me grow as a developer.

    • Challenging projects that will push my skills to the limit

    • Opportunities to learn new technologies and programming languages

    • Collaborative work environment with experienced developers

    • Clear communication and feedback on my work

    • Opportunities for career growth and advancement

  • Answered by AI

Interview Preparation Tips

Round: Technical Interview
Experience: Pay me high!!
Tips: Never say something like that!!

Skill Tips: Develop codes
Skills: Programming
College Name: IIT BOMBAY

Interview Questionnaire 

9 Questions

  • Q1. A sentence is given which contains lowercase English letters and spaces. It may contain multiple spaces. Get first letter of every word and return the result as a string. The result should not contain any ...
  • Q2. Find Nth largest element in the BST
  • Ans. 

    Find Nth largest element in the BST

    • Traverse the BST in reverse inorder and keep track of count

    • If count equals N, return the current node's value

    • If count exceeds N, stop traversing and return null

    • If count is less than N, continue traversing

  • Answered by AI
  • Q3. Given a BST, find the node which contains the value which is equal to or greater than the input value?
  • Ans. 

    Find node in BST with value equal to or greater than input value.

    • Start at root node

    • If input value is less than current node value, move to left child

    • If input value is greater than or equal to current node value, move to right child

    • Repeat until node with desired value is found or null is reached

  • Answered by AI
  • Q4. Write a program to check if a binary tree is balanced
  • Ans. 

    Program to check if a binary tree is balanced

    • Calculate height of left and right subtrees recursively

    • Check if the difference in height is not more than 1

    • Repeat for all nodes in the tree

    • Time complexity: O(nlogn) or O(n)

    • Space complexity: O(h) where h is the height of the tree

  • Answered by AI
  • Q5. Given s string, Find max size of a sub-string, in which no duplicate chars present?
  • Ans. 

    Find max size of a sub-string with no duplicate characters in a given string.

    • Use a sliding window approach with two pointers.

    • Maintain a hash set to keep track of unique characters.

    • Update the maximum length of the substring as you iterate through the string.

  • Answered by AI
  • Q6. What is a hash table? Explain how they work (hash function and buckets)?
  • Ans. 

    A hash table is a data structure that stores key-value pairs and uses a hash function to map keys to buckets.

    • Hash function takes a key and returns an index to a bucket

    • Collisions occur when multiple keys map to the same bucket

    • Collision resolution techniques include chaining and open addressing

    • Example: Dictionary in Python uses hash tables to store key-value pairs

  • Answered by AI
  • Q7. WAP to find a continuous subset whose sum is divisible by 7. We are given a array of number (-ve and +ve). calculate the complexity of your algorithm?
  • Ans. 

    WAP to find a continuous subset divisible by 7 from an array of numbers. Calculate algorithm complexity.

    • Iterate through the array and calculate the prefix sum modulo 7 at each index.

    • Store the prefix sum modulo 7 in a hash table with the index as the value.

    • If a prefix sum modulo 7 is already in the hash table, the subarray between the two indices has a sum divisible by 7.

    • Time complexity is O(n) and space complexity is O

  • Answered by AI
  • Q8. Given a 2-dimensional array of integers, find the value 1 in the array, and set all those rows, and columns to 1, which contains one of the values as 1
  • Ans. 

    Given a 2D array of integers, set rows and columns to 1 if they contain 1.

    • Iterate through the array to find the index of 1

    • Use two arrays to keep track of rows and columns with 1

    • Iterate through the rows and columns arrays to set values to 1

  • Answered by AI
  • Q9. How to find a number in a rotated sorted array. He was looking for the binary search kind of solution?

Interview Preparation Tips

General Tips: Flipkart Interview Process :-Telephonic Round : 1F2F : 3 Rounds
Skills: Data structure, Algorithm
College Name: NA

Skills evaluated in this interview

Interview Questionnaire 

9 Questions

  • Q1. Write code to find sum of two numbers stored as linked list.(LSB at last node) and head of each list is given
  • Ans. 

    Code to find sum of two numbers stored as linked list.

    • Traverse both lists simultaneously and add corresponding nodes

    • Keep track of carry and add it to next sum

    • Create a new node for each sum and move to next node

  • Answered by AI
  • Q2. Write code to print elements on the path from root to leaf node having the maximum sum
  • Ans. 

    Code to print elements on path from root to leaf node with max sum

    • Traverse the tree and keep track of the maximum sum path

    • Use recursion to traverse the tree

    • Print the path when a leaf node with maximum sum is reached

  • Answered by AI
  • Q3. What is the complexity of retrieving min element from a max heap
  • Ans. 

    Retrieving min element from a max heap has a time complexity of O(log n).

    • The min element is always the leftmost leaf node in the last level of the heap.

    • To retrieve it, swap it with the last element in the heap and remove it.

    • Then, bubble down the new root to maintain the max heap property.

    • Examples: retrieving the smallest number in a priority queue implemented as a max heap.

    • Examples: retrieving the smallest element in a

  • Answered by AI
  • Q4. Which is the fastet method to sort an almost sorted array: quick sort,bubble sort,merge sort,shell sort
  • Ans. 

    The fastest method to sort an almost sorted array is shell sort.

    • Shell sort has a time complexity of O(n log n) which is faster than bubble sort and insertion sort.

    • Quick sort and merge sort have a time complexity of O(n log n) but they are not optimized for almost sorted arrays.

    • Shell sort works by comparing elements that are far apart first and then gradually reducing the gap between them.

    • Example: If the array is [1, 3,...

  • Answered by AI
  • Q5. Tell about zombie process?
  • Ans. 

    A zombie process is a process that has completed execution but still has an entry in the process table.

    • Zombie processes occur when a parent process does not properly wait for its child process to terminate.

    • The zombie process remains in the process table until the parent process reads its exit status.

    • Zombie processes do not consume system resources but can accumulate if not properly handled.

    • They can be identified using ...

  • Answered by AI
  • Q6. Complexities on hash table?
  • Ans. 

    Hash tables have complexities related to collisions, resizing, and choosing a good hash function.

    • Collisions occur when two keys map to the same index, requiring a collision resolution strategy.

    • Resizing can be expensive as all elements need to be rehashed and moved to new locations.

    • Choosing a good hash function is important to minimize collisions and ensure even distribution of keys.

    • Examples of collision resolution stra...

  • Answered by AI
  • Q7. Reverse linked list and a few questions on tress and dynamic prog and aptitude testing?
  • Q8. Given an array find any three numbers which sum to zero. Give the best algorithm?
  • Ans. 

    Algorithm to find any three numbers in an array that sum to zero.

    • Sort the array in ascending order.

    • Loop through the array and fix the first number.

    • Use two pointers to find the other two numbers that sum to the negative of the fixed number.

    • If found, return the three numbers.

    • If not found, move to the next number and repeat the process.

    • Time complexity: O(n^2)

  • Answered by AI
  • Q9. Given a BST, how would you return the kth smallest element. Cover all the corner cases with time complexity logn?
  • Ans. 

    Returning kth smallest element in a BST with time complexity logn.

    • Perform in-order traversal and keep track of count until kth element is reached

    • If kth element is found, return it

    • If kth element is not found, continue traversal

    • If traversal is complete and kth element is not found, return null

    • Time complexity is logn as we only traverse the height of the tree

  • Answered by AI

Interview Preparation Tips

Skills: Programming, Algorithm
College Name: NA

Skills evaluated in this interview

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

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 69 salaries
₹8 L/yr - ₹25.1 L/yr
76% 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
744 salaries
unlock blur

₹1 L/yr - ₹6 L/yr

CAR Driver
497 salaries
unlock blur

₹1 L/yr - ₹6 L/yr

Business Development Executive
241 salaries
unlock blur

₹1.8 L/yr - ₹5 L/yr

Assistant Manager
235 salaries
unlock blur

₹4.2 L/yr - ₹17.5 L/yr

Senior Executive
221 salaries
unlock blur

₹2 L/yr - ₹7.5 L/yr

Explore more salaries
Compare Ola Cabs with

Uber

4.2
Compare

Meru cabs

3.8
Compare

Flipkart

3.9
Compare

Udaan

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