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

SDE - 1

Cleartrip
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I took admission into BITs Pilani for B.tech in Computer Science. I started my coding journey in my second year of graduation. I asked and consulted seniors on how to start my career. I started doing DSA.
Application story
I got a message from my college placement cell about the company visiting our campus for the hiring of SDE-1. I applied and participated in its selection process and luckily most of the questions were from the list of important questions shared by my friend.
Why selected/rejected for the role?
I think my skills and knowledge were up to the mark that they found me as a valuable candidate. Moreover, my communication skills added up to my numbers.
Preparation
Duration: 4 months
Topics: Data Structures & Algorithms, DBMS, OS, Android Development, Web Development, C++, OOPS
Tip
Tip

Tip 1 : Become Pro in atleast one programming language (preferably Java/C++)
Tip 2 : Master DSA and solve a lot of problems on various platforms (leetcode,hackerrank,codechef,etc)
Tip 3 : Make some good projects related to your field of expertise, and do it on your own and deploy it.

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

Tip 1: Use some good Templates (I used novoresume to build my resume) 
Tip 2: Don't put irrelevant things
Tip 3 : Highlight the technologies used in your projects & internships

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 mins
Interview date10 Dec 2020
Coding problem3

Three DSA based questions were asked and this round was Live coding round

1. Min Efforts Required

Problem approach

Think using Heap concept

2. Minimum Number of Platforms

Moderate
30m average time
70% success
0/80
Asked in companies
MeeshoGrabAmazon

You have been given two arrays, 'AT' and 'DT', representing the arrival and departure times of all trains that reach a railway station.

Your task is to find the minimum number of platforms required for the railway station so that no train needs to wait.

Note :
1. Every train will depart on the same day and the departure time will always be greater than the arrival time. For example, A train with arrival time 2240 and departure time 1930 is not possible.

2. Time will be given in 24H format and colons will be omitted for convenience. For example, 9:05AM will be given as "905", or 9:10PM will be given as "2110".

3. Also, there will be no leading zeroes in the given times. For example, 12:10AM will be given as “10” and not as “0010”.
Problem approach

solved using Mores Algo

Try solving now

3. Rat In A Maze

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

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination. The rat's destination is at ('N' - 1, 'N' - 1). Your task is to find all the possible paths that the rat can take to reach from source to destination in the maze. The possible directions that it can take to move in the maze are 'U'(up) i.e. (x, y - 1) , 'D'(down) i.e. (x, y + 1) , 'L' (left) i.e. (x - 1, y), 'R' (right) i.e. (x + 1, y).

Note:
Here, sorted paths mean that the expected output should be in alphabetical order.
For Example:
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1 
Expected Output:
DDRDRR DRDDRR 
i.e. Path-1: DDRDRR and Path-2: DRDDRR

The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
Problem approach

I solved using DP concept

Try solving now
02
Round
Medium
Video Call
Duration60 mins
Interview date11 Dec 2020
Coding problem2

One medium-level DS and Algo-based questions were asked by the interviewer followed by OS

1. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
IBMInfo Edge India (Naukri.com)Amazon

You are given an array 'a' of size 'n'.



The Next Greater Element for an element 'x' is the first element on the right side of 'x' in the array, which is greater than 'x'.


If no greater elements exist to the right of 'x', consider the next greater element as -1.


For example:
Input: 'a' = [7, 12, 1, 20]

Output: NGE = [12, 20, 20, -1]

Explanation: For the given array,

- The next greater element for 7 is 12.

- The next greater element for 12 is 20. 

- The next greater element for 1 is 20. 

- There is no greater element for 20 on the right side. So we consider NGE as -1.
Problem approach

I have solved using stack

Try solving now

2. OS Questions


What are semaphores? 
Follow up questions - 
What is critical section problem?
Code it with multithreading program. (i used java)
What is thread? What is process? Differences between them.
Execution flow in multithreaded program, with preemption and critical section problem happening. And how semaphores are actually helping to overcome this problem.

Other methods to solve critical section problem - 
Locking Mechanism (With pseudo code)
Mutex. What is it? Semaphore vs mutex

03
Round
Medium
Video Call
Duration90 mins
Interview date11 Dec 2020
Coding problem1

Mainly focused on my project

1. Technical Questions


He choose my Android Project to have a indepth discussion (Android chat application using end-to-end encryption using AES).
He asked me to present the code, i opened android studio, with my screen being presented.
I explained the folder structure, and how everything is working, and how we are interacting with the database (Firebase).
Then he asked on what basis we are fetching the user list, and i also showed the data stored (in Firebase console).
Then he asked about the encryption part, why we are doing it.

Then he saw that, i was storing the chat data, twice in the database, on in the room for sender and one for the receiver. Basically i was concatenating the user IDs to create room , so there were two rooms created, 

He asked me to change the logic so that, chat gets stored once only, so i had to create a common room, such that both sender and receiver can fetch the chat details. To create a common room for both users, i used character by character ASCII sum of both user IDs, so it will be common on both sides, and chat data can be fetched from the database using a common Room ID.

Problem approach

Brush up all the concepts you used in projects and try keep proper eye contact with interviewer while answering.

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
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
961 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes