Uber Intial Screening Question for Senior Software Engineering Role
Summary
This post describes the initial screening questions for a Senior Software Engineering role at Uber, which focused on finding local minima in an array.
Full Experience
I encountered the following questions during my initial screening for a Senior Software Engineering Role:
- Final all the local minima in an array, and return indices
Local Minia: Left and right elements are equal or less than it is considered as local minimaExample: Input Values: [3,5,1,4,7] Result: [3, 1] Since we have to return the index, hence answer is [0, 2] - Efficient: Find any local minima
Trick is you have to solve the problem using the binary searchInput Values: [3,5,1,4,7] Answer: 0
Interview Questions (2)
Find All Local Minima in an Array
Find all the local minima in an array, and return indices. Local Minima: Left and right elements are equal or less than it is considered as local minima
Example:
Input Values: [3,5,1,4,7]
Result: [3, 1]
Since we have to return the index, hence answer is
[0, 2]
Efficiently Find Any Local Minima in an Array
Efficient: Find any local minima
Input Values: [3,5,1,4,7]
Answer: 0
Trick is you have to solve the problem using the binary search