New update is available. Click here to update.

SDE - 1

Ola

6 rounds | 15 Coding
problems

2252 views

0 comments

2 upvotes

Interview preparation journey

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

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

Problems3

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.

K Most Frequent Words

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.

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.

Problem approach

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

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

Problems3

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

LRU Cache Implementation

view more

Problem approach

Solved this by taking deque and map data structure.

Next Greater Element

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.

Decode String

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.

03

Round

Easy

Face to Face

Duration60 minutes

Interview date9 Sep 2019

Problems4

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

Description of your internships projects.

Problem approach

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

Reverse Words in a String

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

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.

Position of First One

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.

Search In Infinite Sorted 0-1 Array

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.

04

Round

Easy

Face to Face

Duration35 minutes

Interview date9 Sep 2019

Problems1

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

K Most Frequent Words

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.

05

Round

Easy

Face to Face

Duration30 minutes

Interview date9 Sep 2019

Problems1

Only a question of System Design was asked

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

Problems3

Very general HR questions were asked

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.

Salary expectations.

Problem approach

Told him my current salary plus the expected hike.

Why do you want to join Ola?

Problem approach

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

Start a Discussion

Similar interview experiences

SDE - Intern

2 rounds | 4 problems

Interviewed by Ola

370 views

0 comments

0 upvotes

SDE - 1

3 rounds | 3 problems

Interviewed by Ola

0 views

0 comments

0 upvotes

SDE - 1

3 rounds | 6 problems

Interviewed by Ola

186 views

0 comments

0 upvotes

SDE - 1

4 rounds | 7 problems

Interviewed by Ola

162 views

0 comments

0 upvotes

Companies with similar interview experiencs

SDE - 1

5 rounds | 12 problems

Interviewed by Amazon

65945 views

21 comments

0 upvotes

SDE - 1

4 rounds | 5 problems

Interviewed by Microsoft

29761 views

4 comments

0 upvotes

SDE - 1

3 rounds | 7 problems

Interviewed by Amazon

19932 views

5 comments

0 upvotes

Popular Interview Experiences: