Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding
Ninjas X Naukri.com

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

Uber

3 rounds | 5 Coding
problems

Preparation

Duration: 3 months

Topics: Dynamic Programming, OOPs, Computer Network, Operating System, Game Theory

Tip

Tip 1 : prepare all Topics from Coding Ninjas of Course Competitive Programming. Also I practiced atleast one question everyday

Tip 2 : Though Data Structure is the base for any tech interview, one must know some other subjects as well like Operating System, Networking, and Database Management System for which I took help from Coding Ninjaâ€™s notes

Application process

Where: Campus

Eligibility: Above 6 CGPA

Resume tip

Tip 1 : Keep your resume up to date and mention 2-3 good level projects which will give a good impression to the interviewer .

Tip 2 : Don't put false things on the resume.

01

Round

Easy

Online Coding Test

Duration90 minutes

Interview date9 Dec 2020

Coding problem2

This round had 2 coding problems and we had to code it on hackerearth only.

The use of Outside IDE was forbidden.

The timing of test was 12:00 PM to 1:30 PM.

```
The presentationâ€™s duration canâ€™t be changed. You can only change the start and end times.
```

02

Round

Medium

Online Coding Test

Duration90 minutes

Interview date11 Dec 2020

Coding problem2

This round was coding round with discussion .

The interviewer tried to trick the questions and wanted to test how we respond if something is asked out of preparation.

The code we ran on Google Docs was checked on Online IDE if it ran for sample inputs.

Timing : 12:00 PM to 1:30 PM

```
Letâ€™s say â€˜Nâ€™ is 4 and â€˜M' is 3. The 3 edges are (1,2), (2,3) and (1,3). Then our graph will look as follows:-
```

```
To make the graph connected we can shift the edge between (1,3) to (1,4). This operation will make the graph connected. There are multiple ways in which we can make graph connected. So, in this case, we can make graph connected in just one operation.
```

```
1. A connected graph is a graph that is connected in the sense of a topological space, i.e., there is a path from any vertex to any other vertex in the graph.
2. There are no repeated edges and self-loops in the graph.
3. You do not need to print anything; it has already been taken care of. Just implement the function.
```

```
For a (6 x 6) board, the numbers are written as follows:
```

```
You start from square 1 of the board (which is always in the last row and first column). On each square say 'X', you can throw a dice which can have six outcomes and you have total control over the outcome of dice throw and you want to find out the minimum number of throws required to reach the last cell.
Some of the squares contain Snakes and Ladders, and these are possibilities of a throw at square 'X':
You choose a destination square 'S' with number 'X+1', 'X+2', 'X+3', 'X+4', 'X+5', or 'X+6', provided this number is <= N*N.
If 'S' has a snake or ladder, you move to the destination of that snake or ladder. Otherwise, you move to S.
A board square on row 'i' and column 'j' has a "Snake or Ladder" if board[i][j] != -1. The destination of that snake or ladder is board[i][j].
```

```
You can only take a snake or ladder at most once per move: if the destination to a snake or ladder is the start of another snake or ladder, you do not continue moving - you have to ignore the snake or ladder present on that square.
For example, if the board is:
-1 1 -1
-1 -1 9
-1 4 -1
Let's say on the first move your destination square is 2 [at row 2, column 1], then you finish your first move at 4 [at row 1, column 2] because you do not continue moving to 9 [at row 0, column 0] by taking the ladder from 4.
A square can also have a Snake or Ladder which will end at the same cell.
For example, if the board is:
-1 3 -1
-1 5 -1
-1 -1 9
Here we can see Snake/Ladder on square 5 [at row 1, column 1] will end on the same square 5.
```

03

Round

Hard

Online Coding Test

Duration75 minutes

Interview date14 Dec 2020

Coding problem1

This was a problem solving round and lasted for 75 minutes. The interviewer gave me a very complicated question.

The round was held on Google Meet and I was supposed to tell him the approach and write code on shared Google Docs.

```
1. 1 â€˜VALâ€™, for this type of query, you need to insert the integer 'VAL' to the end of the array.
2. 2 â€˜VALâ€™, for this type of query, you need to take the bitwise XOR of all the elements of the array with 'VAL' i.e each element of the array â€˜ARRâ€™ will be updated as â€˜ARR[i]â€™ = â€˜ARR[i]â€™ ^ â€˜VALâ€™ ( ^ denotes the bitwise XOR operation).
```

```
1) Bitwise XOR operation takes two numbers and performs XOR operation on every bit of those two numbers. For example, consider two numbers 2 and 3 their bitwise XOR will be 1. Because the binary representation of 2 is '10' and the binary representation of 3 is '11'. And XOR of '10' and '11' will be '01'(because XOR evaluates to 0 if the corresponding bits are the same in both the operands, otherwise it evaluates to 1), which is equal to 1.
2) The first query will always be a type 1 query.
3) Note that the ith query should be performed on the array obtained after performing (i-1)th query on the array and so on i.e the changes of each query are updated on the original array itself.
```

Here's your problem of the day

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

How do you write a single-line comment in C++?

Choose another skill to practice

Join the Discussion

1 reply

Similar interview experiences

SDE - Intern

4 rounds | 7 problems

Interviewed by Uber

3186 views

1 comments

0 upvotes

SDE - Intern

3 rounds | 4 problems

Interviewed by Uber

0 views

0 comments

0 upvotes

SDE - Intern

2 rounds | 5 problems

Interviewed by Uber

566 views

0 comments

0 upvotes

SDE - Intern

2 rounds | 5 problems

Interviewed by Uber

451 views

0 comments

0 upvotes

Companies with similar interview experiences

SDE - Intern

3 rounds | 6 problems

Interviewed by Amazon

13360 views

4 comments

0 upvotes

SDE - Intern

4 rounds | 7 problems

Interviewed by Microsoft

12384 views

1 comments

0 upvotes

SDE - Intern

2 rounds | 4 problems

Interviewed by Amazon

8920 views

2 comments

0 upvotes

Did it have any branch constarints or gap year constraints ?

Pls reply !!