Urban Company (UrbanClap) interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Urban Company (UrbanClap)
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Data Structures, OOPs, DBMS, System Design, Algorithms
Tip
Tip

Tip 1 : Do structured learning/practice of DSA. It's better to follow some sheet 
Tip 2 : In parallel to DSA, try to give some time (2-3 hrs a day) to other topics particularly OOPs, DBMS and OS, CN fundamentals

Application process
Where: Campus
Eligibility: 8 CGPA
Resume Tip
Resume tip

Tip 1 : It's better to have at least 2 decent projects/internships on the resume.
Tip 2 : Check the ATS score of your CV online and try to maximize it.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date30 Oct 2021
Coding problem3

The round was held around 8 pm. Proctoring was done using live video and audio recordings and we were not allowed to change tabs. 3 coding questions were asked. 1 easy, 1 medium and 1 hard.

1. Server Manager

Moderate
0/80
Asked in companies
Urban Company (UrbanClap)Google inc
Sheldon is working for coding ninjas as server manager. Due to excessive traffic on the website, he is asked to reduce the load by dividing the total traffic into two servers. He is given an array of integers “load” denoting the load by every process, He wants to divide the load into two parts such that the absolute difference between both the servers is minimum. As Sheldon is too busy with his other chores. Help him to find the minimum possible absolute difference.
For Example :
load = {10, 11, 7, 5}

In the given example, the total load can be divided such that the first server handles processes 1st and 3rd and the second server handles processes 2nd and 4th. Hence the absolute difference is abs((10 + 7) - (11 + 5)) = 1.

So the final answer is 1.
Try solving now

2. XOR Query

Moderate
10m average time
90% success
0/80
Asked in companies
UberRubrik, Inc.Urban Company (UrbanClap)

Assume you initially have an empty array say ‘ARR’.

You need to return the updated array provided that some ‘Q’ number of queries were performed on this array.

The queries are of two types:

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

Note:

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.
Try solving now

3. Alice And The Game Of Coins

Moderate
0/80
Asked in companies
FacebookUrban Company (UrbanClap)

Alice and Bob are playing a game on coins; there are 'N' coins placed along an imaginary X-axis, and Bob asks Alice to solve the following problem.

A coin is special if it is on one of the ends of the coin stream. In one move, a person can move any special coin to make it not special. And after movement, according to its updated position, it should not be a special coin again. If there is no possible move, the game will be stopped.

Alice has to tell Bob the maximum, and a minimum number of coins can be moved.

Your task is to help Alice to find the minimum and maximum number of coins that can be moved.

EXAMPLE:
Input: 'N' = 3, 'COINS' = [8, 5, 10]
Output: Maximum = 2, Minimum = 1

Alice can move 5 -> 9 for one move, and then the game will be stopped.
Also, she can move 10 -> 6, 5 -> 7 for two moves, and then the game will be stopped.
Try solving now
02
Round
Medium
Video Call
Duration35 Minutes
Interview date8 Nov 2021
Coding problem1

round was conducted in the morning

1. Consecutive Characters

Moderate
25m average time
70% success
0/80
Asked in companies
Urban Company (UrbanClap)Goldman SachsInfo Edge India (Naukri.com)

You are given a matrix of 'N' rows and 'M' columns consisting of lowercase characters. You are provided with a string ‘STR,’ and your task is to find the length of the longest consecutive character path for each character in the string ‘STR’. All characters in the path are consecutive, i.e., every character in the path is next to the previous character in alphabetical order. It is allowed to move in all 8 adjacent directions from a cell.

Note:
Suppose you are at position (x, y) then you can move to : [ (x + 1 , y ), ( x - 1 , y ), ( x , y + 1), (x , y - 1), (x + 1, y + 1), (x + 1, y - 1), (x - 1, y + 1), (x - 1, y - 1) ].
For Example:
If ‘N’ = 2, ‘M’ = 2, 'STR’ = "a" and the input matrix is 
[ [ ab ]
  [ ed ] ] 
We need to find the maximum length of the path from starting character ’a’. So the maximum length is 2, which is [a, b]. Hence, the answer is [2].
Try solving now
03
Round
Medium
Video Call
Duration50 minutes
Interview date8 Nov 2021
Coding problem1

Was held in the morning just after 1.5 hrs after round 1

1. System Design Question

Design an app for smart home. You can register your appliances there and can control your appliances using the app.

Problem approach

Tip 1 : Keep OOP's concepts strong especially encapsulation and inheritance for such interviews.
Tip 2 : Try to identify and solve all the edge cases

04
Round
Medium
HR Round
Duration50 Minutes
Interview date8 Nov 2021
Coding problem1

2 hours after the third round

1. Basic HR Questions

Specific questions on projects and internships mentioned in the CV were asked. Also some behavioural questions - Why should we hire you?

Problem approach

Tip 1 : Don't write false projects/internships in the CV because they will ask deep questions about them and you will get caught for sure. 
Tip 2 : Revise the work you did in your projects/internships before the interview.

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
SDE - 1
3 rounds | 5 problems
Interviewed by Urban Company (UrbanClap)
3462 views
0 comments
0 upvotes
SDE - 1
4 rounds | 7 problems
Interviewed by Urban Company (UrbanClap)
874 views
0 comments
0 upvotes
SDE - 1
2 rounds | 3 problems
Interviewed by Urban Company (UrbanClap)
780 views
0 comments
0 upvotes
SDE - 1
3 rounds | 6 problems
Interviewed by Urban Company (UrbanClap)
810 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114580 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57826 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34962 views
7 comments
0 upvotes