Reddit Question · Mar 2025 · India

Uber Online Assessment | Backend Engineer | India

103 upvotes 39 replies

Question Details

I recently appeared for Uber's Backend Engineer role's Online Assesment (OA) and faced following problems. The OA was hosted on code signal and I was given 70 minutes to solve all the 4 questions. I w

Full Details

I recently appeared for Uber's Backend Engineer role's Online Assesment (OA) and faced following problems. The OA was hosted on code signal and I was given 70 minutes to solve all the 4 questions. I was able to solve 3 of them completly and in the last one I hit TLE. My assessment score came out to be 510. Here are the questions: # Question 1 Start with 1500 rating. You're given a diff array that defines the amount your rating has changed. After performing diff array changes in your initial rating return the max rating so far and your current rating.

Example:

Input: diff=[10,50,-10,100]

Output: [1650,1650] # Question 2 You're given a forest array where 0 means empty space and +ve integer means a stick of size forest[i]. You're also give an index bird which denotes the init place of a bird in forest. Bird will always be at an empty index. The bird wants to build a nest of size 100 using the sticks in forest. In order to do so it follows the following algo: 1. It flies to right until it finds a stick. 2. Brings it back to its nest to build it. 3. Then turns it direction and does the step 2. The bird keep following above until its nest of size 100 or greater is built. You need to return an array denoting the index of sticks that the bird picked to create the nest sorted in the order it picked them.

Example:

Input: forest=[10,50,0,100] bird=2

Output: [3] # Question 3 This was directly from the Uber tagged questions: <a href="https://leetcode.com/problems/rotating-the-box/description/.

Example:

Input: query=[[2,1],[3,1],[4,3],[5,1],[4,1]]

Output: [0,1,1,1,3] Would really appreciate if someone can share the solution for this one or its equivalent LC. Hope this helps! Thanks!

About This Question

This is a reported interview question from a uber interview for a backend role during the oa round reported in 2025.

It covers the following topics: Arrays, Matrix, Sql .