Uber Software Engineer Interview Experience — Building a Directory Tree and Traversing It with a Manual Stack

Uber·Software Engineer·Sep 2026
Technical ScreenRejectedmedium

The interview lasted 45 minutes. We first went through my resume. I was asked about my most challenging project and the technology stack I normally use, and the interviewer introduced the work of the hiring group.

The remaining half hour was for coding. Given a series of file paths, I needed to build a directory tree and find the full path of a file in that tree. Directory names could repeat, but full paths would not.

At first, I used each complete path segment as a tree node. The interviewer asked what would happen if a path were especially long, so I changed the design to build the tree from node names. The final requirement was to avoid recursion and maintain a stack manually. I forgot the template and spent a long time debugging, so I did not finish and was rejected.

The input and paths shown were:

directories = ["/a", "/a/b", "/a/c/file1.txt", "/a/c/d", "/e", "/e/c", "/e/f/file2.txt"]
/a
/a/b
/a/b/c
/a/c/file1.txt
/e
/e/c
/e/f/file2.txt

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Uber
Role
Software Engineer
Rounds
Technical Screen
Outcome
Rejected
Difficulty
medium
Interview date
Sep 2026
Questions from this interview
1 question

Real Uber interview experiences

First-hand reports from Uber candidates — the rounds, the questions they were asked, and how it went.

All 53 Uber interview experiences