Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Ola interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Ola
upvote
share-icon
6 rounds | 15 Coding problems

Interview preparation journey

expand-icon
Journey
Before cracking any interview you need to prepare your basics. So, I started doing all the vital topics and subjects like DBMS, DSA, Networking, and Operating Systems. After preparing the top 100 or 150 questions on each topic I prepared all my projects and resume which was the most important step.
Application story
I started preparing for my placements and found that Ola has posted a job listing on LinkedIn for Software Engineer that suits my interest. After that I was selected for the interview rounds.
Why selected/rejected for the role?
I was selected because I had developed skills like DSA, problem-solving, and Logical building ability. The interviewer was satisfied by all the approaches that I gave. I also prepared for the HR round because all the questions asked in the HR round I was already familiar with them because of my extracurricular activities and that's why I was capable to answer them correctly.
Preparation
Duration: 4.5 months
Topics: DSA, Operating systems, Databases, System design, Networking
Tip
Tip

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 process
Where: Other
Eligibility:
Resume Tip
Resume tip

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)

Interview rounds

01
Round
Easy
Telephonic
Duration45 minutes
Interview date9 Sep 2019
Coding problem3

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.

1. K Most Frequent Words

Moderate
36m average time
65% success
0/80
Asked in companies
Paytm (One97 Communications Limited)SalesforceDunzo

Given a linked list, reverse alternate nodes and append them to the end of the list. Extra allowed space is O(1)

Examples:

 

Input: 1->2->3->4->5->6

Output: 1->3->5->6->4->2

Explanation: Two lists are 1->3->5 and 2->4->6,  

reverse the 2nd list: 6->4->2.  

Merge the lists  

 ...

View more
Problem approach

Gave the approach in which we maintain a two separate linked list one for odd position elements and others for even. Then traverse the linked list and push the odd position element to the odd linked list and similarly for even and now attach both the linked list according to question and the interviewer was satisfied with my approach.

Try solving now

2. If you are given two traversal sequences, can you construct the binary tree?

It depends on what traversals are given. If one of the traversal methods is Inorder then the tree can be constructed, otherwise not.

Mirror
Problem approach

I said yes, and gave him an example by taking preorder and inorder traversal.

3. Puzzle | 3 Ants and Triangle

There are 3 ants sitting on three corners of a triangle. All ants randomly pick a direction and start moving along edge of the triangle. What is the probability that any two ants collide?

Problem approach

Initially, I was not getting any approach but then the interviewer gave me hint that is collision will not happen when all ants move in the counterclockwise direction or in a clockwise direction. Then I took an example and apply permutation and combination and found probability and he was satisfied with my approach.

02
Round
Easy
Online Coding Interview
Duration120 minutes
Interview date9 Sep 2019
Coding problem3

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

1. LRU Cache Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
FlipkartCIS - Cyber InfrastructureIntuit

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

View more
Problem approach

Solved this by taking deque and map data structure.

Try solving now

2. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
DunzoCiscoIBM

Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of x in array. Elements for which no greater element exist, consider next greater element as -1.

 

Examples:

 

For any array, rightmost element always has next greater element as -1.

For an array ...

View more
Problem approach

Solved this question using stack and comparing current element of array to top of the stack.

Try solving now

3. Decode String

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

An encoded string (s) is given, the task is to decode it. The pattern in which the strings are encoded is as follows.

 

<count>[sub_str] ==> The substring 'sub_str'  

                     appears count times.

Examples:

 

Input : str[] = "1[b]"

Output : b

 

In...

View more
Problem approach

Used two stacks one for integer and the other for char and solved this by string traversal and applied the comparison conditions according to the question.

Try solving now
03
Round
Easy
Face to Face
Duration60 minutes
Interview date9 Sep 2019
Coding problem4

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

1. Description of your internships projects.

Problem approach

Thoroughly gave the description of the two projects that I have done in my two internships.

2. Reverse Words in a String

Easy
10m average time
90% success
0/40
Asked in companies
FacebookAppleProtiviti

Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”

reverse-words

reverse-words

 

Examples:

 

Input: s = “geeks quiz practice code”

Output: s =...

View more
Problem approach

This was a standard question of string and gave him an approach to initially reverse each word of string and then reversed the whole string and he was satisfied with that approach.

Try solving now

3. Position of First One

Easy
15m average time
85% success
0/40
Asked in companies
BarclaysOlaTata Consultancy Services (TCS)

Given a sorted array consisting 0’s and 1’s. The problem is to find the index of first ‘1’ in the sorted array. It could be possible that the array consists of only 0’s or only 1’s. If 1’s are not present in the array then print “-1”.

 

Examples :

 

Input : arr[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1}

Output : 6

The index of first 1 in the array is 6.

...
View more
Problem approach

I gave him a binary search approach for this question and he was satisfied.

Try solving now

4. Search In Infinite Sorted 0-1 Array

Easy
10m average time
90% success
0/40
Asked in companies
IBMOlaQualcomm

Given an infinite sorted array consisting 0s and 1s. The problem is to find the index of first ‘1’ in that array. As the array is infinite, therefore it is guaranteed that number ‘1’ will be present in the array.

 

Examples:

 

Input : arr[] = {0, 0, 1, 1, 1, 1}  

Output : 2

 

Input : arr[] = {1, 1, 1, 1,, 1, 1}

Output : 0

Problem approach

He extended the above question and after a hint, I was able to come up with binary search approach in which the end index would double up each time the binary search was called, he looked convinced.

Try solving now
04
Round
Easy
Face to Face
Duration35 minutes
Interview date9 Sep 2019
Coding problem1

This round was again a face to face technical interview, I was just asked one question in this round.

1. K Most Frequent Words

Moderate
36m average time
65% success
0/80
Asked in companies
Paytm (One97 Communications Limited)SalesforceDunzo

Given a book of words. Assume you have enough main memory to accommodate all words. design a data structure to find top K maximum occurring words. The data structure should be dynamic so that new words can be added.

Problem approach

I gave an approach using k sized max heap, after getting satisfied with the approach the Interviewer asked me to code it, I missed a boundary case of the array of strings being empty which the Interviewer pointed out and asked me to cover it along with other such cases, I modified the code for such conditions and upon 2nd review the interviewer was satisfied.

Try solving now
05
Round
Easy
Face to Face
Duration30 minutes
Interview date9 Sep 2019
Coding problem1

Only a question of System Design was asked

1. System Design

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

Problem approach

Designed the given question by considering each scenario or test case the and use most optimal data structures in the solution.case the

06
Round
Easy
HR Round
Duration30 minutes
Interview date9 Sep 2019
Coding problem3

Very general HR questions were asked

1. What are your strengths and weaknesses?

Problem approach

Just spoke the truth and told HR about my weaknesses and strength and why I will be a valuable asset to OLA.

2. Salary expectations.

Problem approach

Told him my current salary plus the expected hike.

3. Why do you want to join Ola?

Problem approach

Gave him the reason why joining OLA is so important for me.

Here's your problem of the day

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

What is the result of 4 % 2?

Start a Discussion
Similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Ola
1025 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Ola
789 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Ola
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Ola
570 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
103832 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
49224 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
30722 views
6 comments
0 upvotes