Ola interview experience Real time questions & tips from candidates to crack your interview

SDE-3

Ola
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I took admission in NIT Jamshedpur in ECE stream. I was advised by my seniors to practice DSA from the very starting of B.Tech and I did not take that seriously. Honestly speaking, I regretted not taking their advice and in third year I started doing coding and I had to increase practice hours because I started late.
Application story
I applied for the post through the Referral . After applying, I practiced hard for it and the hard work paid off at the last.
Why selected/rejected for the role?
I was able to solve almost all the questions asked me during the selection process. I have done a lot of coding practice on Competitive programming sites and built a deep understanding of programming skills. My good communication skills are also one reason of my selection.
Preparation
Duration: 4 months
Topics: Data Structures and Algorithms, Operating Systems, Computer Networks, Java, Apache Kafka · Go · Apache Spark · Java · Scala · Flink
Tip
Tip

Tip 1 : Even if you are stuck in the problem, just give a try. The interviewer will help you definitely for sure.
Tip 2 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems.
Tip 3 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume

Application process
Where: Referral
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : List the projects and give a brief note about them.
Tip 2 : Place only those skills that you are confident on.

Interview rounds

01
Round
Medium
Face to Face
Duration60 minutes
Interview date19 Feb 2023
Coding problem2

1. Remove Consecutive Duplicates

Easy
0/40
Asked in companies
OlaWalmartSamsung

You are given a string ‘str’ of size ‘N’. Your task is to remove consecutive duplicates from this string recursively.

For example:

If the input string is ‘str’ = ”aazbbby”, then your output will be “azby”.
Note that we are just removing adjacent duplicates.
Problem approach

At first, I was trying to do it in n passes, where in every pass, we tried to remove adjacent characters. The interviewer asked me to optimize the solution. I used a stack and visited each character only once, reducing the time complexity to O(n).

Try solving now

2. Frequency In A Sorted Array

Easy
15m average time
85% success
0/40
Asked in companies
OlaAdobeMcAfee

You are given a sorted array 'ARR' and a number 'X'. Your task is to count the number of occurrences of 'X' in 'ARR'.

Note :
1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
Problem approach

First, I told the interviewer that we could use a hash map to store the count of every element. The interviewer then asked me to reduce the time and space complexity. I subsequently used binary search to find the first and last occurrence of the element and returned the difference between them.

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date21 Feb 2023
Coding problem2

1. Binary Tree Zigzag Traversal

Easy
15m average time
85% success
0/40
Asked in companies
PayUDelhiveryExpedia Group

You have been given a Binary Tree of 'N' nodes, where the nodes have integer values. Your task is to print the zigzag traversal of the given tree.

Note:
In zigzag order, level 1 is printed from left to right fashion, level 2 is printed from right to left. and level 3 is printed from left to right again, and so on…..
For example:
For the given binary tree

1

The zigzag  traversal is [1, 4, 3, 5, 2, 7, 6]
Problem approach

I first tried to print the level order traversal and then modified the approach to print the zigzag traversal.

Try solving now

2. The Celebrity Problem

Moderate
30m average time
60% success
0/80
Asked in companies
OlaVisaApple

There are ‘N’ people at a party. Each person has been assigned a unique id between 0 to 'N' - 1(both inclusive). A celebrity is a person who is known to everyone but does not know anyone at the party.

Given a helper function ‘knows(A, B)’, It will returns "true" if the person having id ‘A’ know the person having id ‘B’ in the party, "false" otherwise. Your task is to find out the celebrity at the party. Print the id of the celebrity, if there is no celebrity at the party then print -1.

Note:
1. The helper function ‘knows’ is already implemented for you.
2. ‘knows(A, B)’ returns "false", if A doesn't know B.
3. You should not implement helper function ‘knows’, or speculate about its implementation.
4. You should minimize the number of calls to function ‘knows(A, B)’.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
Problem approach

I was struggling to find the approach and got an idea that it can be solved using two pointer approach to optimize the time complexity and space complexity. I gave my approach and interviewer was happy with it. I tried to write the code. Basic test cases were passed. But one of the edge case is not passed. I tried to modify the code but could not be able to complete it.

Try solving now
03
Round
Medium
Face to Face
Duration60 minutes
Interview date26 Feb 2023
Coding problem2

1. Tiling Problem

Hard
45m average time
0/120
Asked in companies
OptumOlaAdobe

You have been given a board where there are '2' rows and 'N' columns. You have an infinite supply of 2x1 tiles, and you can place a tile in the following ways:

1. Horizontally as 1x2 tile
2. Vertically as 2x1 tile

Count the number of ways to tile the given board using the available tiles.

Note :
The number of ways might be large so output your answer modulo 10^9 + 7.

Here an example of tile and board for 'N' = 4 :

Tiling Example

Problem approach

I have done this problem earlier so got the DP based approach during the test and this approach passed all the test cases.

Try solving now

2. Minimum Cost Path

Moderate
25m average time
70% success
0/80
Asked in companies
HSBCHCL TechnologiesHCL Technologies

You have been given a matrix of ‘N’ rows and ‘M’ columns filled up with integers. Find the minimum sum that can be obtained from a path which from cell (x,y) and ends at the top left corner (1,1).

From any cell in a row, we can move to the right, down or the down right diagonal cell. So from a particular cell (row, col), we can move to the following three cells:

Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
Problem approach

I had practiced enough of DP questions, so, this one looked fairly easy. Since, it was a standard DP question, the same approach worked here too.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Ola
1645 views
0 comments
0 upvotes
company logo
SDE-3
4 rounds | 5 problems
Interviewed by Ola
1361 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Ola
1553 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Ola
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE-3
3 rounds | 3 problems
Interviewed by Walmart
2385 views
0 comments
0 upvotes
company logo
SDE-3
3 rounds | 3 problems
Interviewed by Oracle
0 views
0 comments
0 upvotes
company logo
SDE-3
5 rounds | 7 problems
Interviewed by Walmart
3687 views
1 comments
0 upvotes