Uber | SSE | Hyderabad | Reject

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2022-06-15Added By Anonymous
Source: Link

Company: Uber

Role: Senior Software Engineer

Interview Stage: Onsite

Location: Hyderabad


Original Post Content:


Round 1: Machine Coding


Given list of folders, print the path of a given folder from root. If there is no path to the root folder then return an empty string. Root level folders will have 0 as id. The structure of Folder is like this:

class Folder {

int id;

List subfolders;

String name;

}


Ex:

list = [Folder(0, [7, 3], “abc”), Folder(0, [], “xyz”), Folder(3, [], “pqr”), Folder(8, [], “def”), Folder(7, [9], “ijk), Folder(9, [], “lmn”)]


/abc/ijk/lmn

/abc/pqr

/xyz

?? def/


printPath(9) = “abc” -> “ijk” -> “lmn” printPath(8) = ""

Clarification: There can be multiple root level folders. All other folders have unique ids.

Note: printPath method may be called multiple times concurrently. Design your solution taking that into account

Concurrency in input and printPath()


addFolder(Folder f)

printPath(int index)


Round 2 (DSA): Given an n-ary tree, print the boundary nodes. Was doable using BFS.

Given a list of string which can contain any characters, write functions to serialize it to a file and then desiarlize the file back into the list.


Round 3 (SD): Design whatsapp.


Round 4 (HM): Discussions on past projects and their designs. Challenges and questions on opeational excellence. Some behavioural questions.


Round 5 (BR): Discussions on previous projects. Effeciency and operational excellance.


Rejected as the recruiter told me that I had all positives except the machine coding one. Can someone help me with the machine coding question.

Comments