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

SDE - 2

Ola
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, OOPS, System Design, Algorithms, Dynamic Programming,System Design
Tip
Tip

Tip 1 : practice the mid level leetcode problems.
Tip 2 : practice the HLD system design problems

Application process
Where: Referral
Eligibility: 7
Resume Tip
Resume tip

Tip 1 : Include the skills that you well know of
Tip 2 : provide ratings of the skills that you know

Interview rounds

01
Round
Hard
Video Call
Duration60 Minutes
Interview date17 Aug 2021
Coding problem1

1. Median in a stream

Hard
50m average time
50% success
0/120
Asked in companies
OlaInfo Edge India (Naukri.com)Samsung

Given that integers are read from a data stream. Your task is to find the median of the elements read so far.

Median is the middle value in an ordered integer list. If the size of the list is even there is no middle value. So the median is the floor of the average of the two middle values.

For example :
[2,3,4] - median is 3.
[2,3] - median is floor((2+3)/2) = 2.


Problem approach

1 I tried to use heap data structure to solve this problem.
2 we can use a max heap on the left side to represent elements that are less than effective median,
3 A min-heap on the right side to represent elements that are greater than effective median.
4 After processing an incoming element, the number of elements in heaps differs utmost by 1 element. When both heaps contain the same number of elements, we pick the average of heaps root data as effective median. 5 When the heaps are not balanced, we select effective median from the root of the heap containing more elements.

Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date31 Aug 2021
Coding problem1

1. Find Peak Element

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

You are given an array 'arr' of length 'n'. Find the index(0-based) of a peak element in the array. If there are multiple peak numbers, return the index of any peak number.


Peak element is defined as that element that is greater than both of its neighbors. If 'arr[i]' is the peak element, 'arr[i - 1]' < 'arr[i]' and 'arr[i + 1]' < 'arr[i]'.


Assume 'arr[-1]' and 'arr[n]' as negative infinity.


Note:
1.  There are no 2 adjacent elements having same value (as mentioned in the constraints).
2.  Do not print anything, just return the index of the peak element (0 - indexed).
3. 'True'/'False' will be printed depending on whether your answer is correct or not.


Example:

Input: 'arr' = [1, 8, 1, 5, 3]

Output: 3

Explanation: There are two possible answers. Both 8 and 5 are peak elements, so the correct answers are their positions, 1 and 3.


Problem approach

1 I have used here Divide and Conquer to find a peak in O(Logn) time. 
2 I used Binary Search to check if the middle element is the peak element or not. If the middle element is not the peak element, then check if the element on the right side is greater than the middle element then there is always a peak element on the right side. 
3 If the element on the left side is greater than the middle element then there is always a peak element on the left side. 
4 Form a recursion and the peak element can be found in log n time.

Try solving now
03
Round
Hard
Video Call
Duration60 Minutes
Interview date7 Sep 2021
Coding problem1

1. System Design Question

Design the spotify app of high level design

Problem approach

Tip 1: Ask clarifying questions and problem area to focus on.
Tip 2: Use and explain caching techniques 
Tip 3: Make use of CDN in architecture.

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
5 rounds | 6 problems
Interviewed by Ola
0 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 3 problems
Interviewed by Ola
1427 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Ola
1612 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 - 2
5 rounds | 12 problems
Interviewed by Walmart
29892 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6766 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5281 views
0 comments
0 upvotes