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

SDE - 2

Ola
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, Array, OS, Algorithms, Aptitude
Tip
Tip

Tip 1 : Sleep and Eat Well
Tip 2 : Practice on HackerRank, Leetcode, HackerEarth.

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

Tip 1 : Have some projects on resume.

Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 minutes
Interview date23 Jun 2022
Coding problem5

1. Bridges In A Graph

Moderate
25m average time
65% success
0/80
Asked in companies
ArcesiumIBMOla

Given an undirected graph of V vertices and E edges. Your task is to find all the bridges in the given undirected graph. A bridge in any graph is defined as an edge which, when removed, makes the graph disconnected (or more precisely, increases the number of connected components in the graph).

For Example :

If the given graph is :

graph

Then the edge between 0 and 4 is the bridge because if the edge between 0 and 4 is removed, then there will be no path left to reach from 0 to 4.and makes the graph disconnected, and increases the number of connected components.

Note :

There are no self-loops(an edge connecting the vertex to itself) in the given graph.

There are no parallel edges i.e no two vertices are directly connected by more than 1 edge.
Try solving now

2. Ninja and The Magical Sword

Moderate
50m average time
55% success
0/80
Asked in company
Ola

Ninja is very fond of strings so he is creating a new type of string, help him in creating his new magical string.

You are given a string ‘S’ of length |S| and an integer ‘N’. Now, you need to find a string 'STR' of length at most ‘N’ such that if you add this string ‘X’ number of times(STR + STR +... X times) let's say it as 'XSTR' then the frequency of each character in 'XSTR' string should be greater than or equal to the frequency of the same character in the string ‘S’. 'XSTR' should cover all the characters of string S.

Help Ninja in finding the minimum possible value of ‘X’.

For example:

Given S = "aaabbc" and N = 4.
Frequency of each character is 'a' = 3, 'b' = 2, and 'c' = 1.

If we take ‘STR’ = "aabc" and add this 2 times i.e "aabcaabc" the frequency of each character will be 'a' = 4, 'b' = 2, 'c' = 2. Here the frequency of each character is greater or equal to that of string ‘S’. i.e for 'a' 4 >= 3, 'b' 2 >= 2 and 'c' 2 >= 1.
Hence X = 2.
We can't find any other string 'STR' of length N such that X < 2.
Try solving now

3. Number Of Sequence

Hard
50m average time
60% success
0/120
Asked in companies
OlaCodenationZoho Corporation

A sequence is called nice by a coding ninja if the following conditions are met:

0 <= ‘ARR’[k] <= k 
‘ARR’[k] = ‘ARR’[m] mod k, for all pairs of k,m such that k divides m.

You are given a sequence of integers ‘ARR’ where some numbers may be -1. Find and print the number of nice sequences you can create by changing each -1 to a non-negative integer. As this number can be quite large, your answer must be modulo it by 10 ^ 9 + 7.

For example:

Given ‘N’ = 3, 
'A' = {0, -1, -1} 
Then the answer is 6 because following sequences are possible:[0, 0, 0], [0, 1, 0], [0, 1, 1], [0, 1, 2], [0, 0, 1], [0, 0, 2].
Try solving now

4. Good Bad Graph

Hard
40m average time
69% success
0/120
Asked in company
Ola

There are ‘N’ cities in ninja Kingdom and Mayer of the city wants to connect all the cities using roads by performing the following operations ‘N - 1’ times. Initially, there are no edges between any cities.

At every operation, you are given two cities, ‘A’ and ‘B’, and you have to connect the city if they are not already connected.

Connected component is that part of the graph in which we have at least two city and we can reach one city to other cities and no two connected components share a common city.

After every input edge, there can be multiple connected components.

Component is good if the number of cities of that component is even; otherwise, it is a bad component.

You need to find the absolute difference between total good and bad components after adding each edge.

Try solving now

5. Balanced Sequence After Replacement

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

You are given a string of length ‘N’ containing only the following characters: ‘[’, ‘{’, ‘(’, ‘)’, ‘}’, ‘]’. At some places, there is ‘X’ in place of any bracket. Your task is to determine that if you replace all the X’s with appropriate brackets, is it possible to get a valid balanced sequence or not.

For example:

For the given string “[X)](X”, the possible replacement for the first X is ‘(‘ and the second X is ‘)’, which makes the sequence “[()]()”, which is a valid balanced sequence. 

For the given string “[XX{”, there is no possible replacement for X which can make it a valid bracket sequence.  
Try solving now
02
Round
Easy
HR Round
Duration10 minutes
Interview date4 May 2022
Coding problem1

1. Basic HR Questions

Describe your responsibilities at your current job. 

What type of teams have you worked with? 

What was your role? 

Describe a time when you experienced conflict with a coworker. How did you handle it? 

How does this job compare to others you might be interviewing for?

Problem approach

Tip 1 : Keep your communication high
Tip 2 : Practice by mock interviews

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 - 2
3 rounds | 3 problems
Interviewed by Ola
1376 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Ola
1552 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Ola
0 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 3 problems
Interviewed by Ola
1758 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29569 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6677 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5175 views
0 comments
0 upvotes