Uber | Software Engineer II | L4 | Onsite Interview | Nov 2021

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2021-12-30Added By Anonymous
Source: Link

Company: Uber

Role: Software Engineer II

Interview Stage: Onsite

Location: San Francisco

Year: 2021


Original Post Content:


Uber interview experience (Offer Received)


Uber Telephonic Interview

Word Search II : https://leetcode.com/problems/word-search-ii/

Completed the question with coding


Uber Virtual onsite Interview: Road safety team


Interview 1 : Behavioral interview


- Name : G****** Na***** : Engineering Manager

- Citizenship, Collaboration, Efficiency & being a force multiplier, Operational Execution


Interview 2 : Coding Interview


- Name : B******** Wi****** : Senior Software Engineer

- variation to : Sliding Window Maximum https://leetcode.com/problems/sliding-window-maximum/

- Find minimum of maximum of k window


We define a subarray of size m in an n-element array to be the contiguous block of elements in the inclusive range from index i to index j, where j − i + 1 = m and 0 ≤ i ≤ j < n. For example, given array [8, 2, 4], the subarrays of size m = 2 would be [8, 2] and [2, 4] (but not [8, 4] since these elements aren’t contiguous).

Given an array of integers arr, and an integer m, your task is the following:

* Find the minimum value in each of the contiguous subarrays of size m;

* Return the maximum value among these minimums.

Complete the solution function in the editor to make it return the needed value.


Example


* For arr = [1, 2, 3, 1, 2] and m = 1, the output should be solution(arr, m) = 3.

The subarrays of size m = 1 are [1], [2], [3], [1], and [2]. Since each array contains only one element, each value is the minimal element of the subarray it is in. The maximum of these values is


3.


* For arr = [1, 1, 1] and m = 2, the output should be solution(arr, m) = 1.

The subarrays of size m = 2 are [1, 1] and [1, 1]. The minimum value for both arrays is 1. The maximum of these values is 1.

* For arr = [2, 5, 4, 6, 8] and m = 3, the output should be solution(arr, m) = 4.

The subarrays of size m = 3 are [2, 5, 4], [5, 4, 6], and [4, 6, 8]. The respective minimum values for these subarrays are 2, 4, and 4, so the maximum of these values is 4.


Input/Output

* [execution time limit] 3 seconds (java)

* [input] array.integer arr

An array of integers in which subarrays should be considered.

Guaranteed constraints:

1 ≤ arr.length ≤ 3 · 105,

1 ≤ arr[i] ≤ 109.

* [input] integer m

An integer representing the size of the subarrays to consider.

Guaranteed constraints:

1 ≤ m ≤ arr.length.

* [output] integer

The maximum value among the minimum values of all subarrays of size m.


Interview 3 : Coding Interview


- Name : M***** X**** : software Engineer II

The storage team is developing a version management system. Every night we built one or a few new releases. The versions could be compatible, which means the system could be upgraded without the data migration; otherwise, we have to upgrade the data before deploying the new release binaries (typically with a MapReduce job to rebuild the data). The compatibility is transitive, which means if version a is compatible with version b, version b is compatible with c, then a is compatible with c. If any of them are incompatible, it makes a to c incompatible. We already have a compatible check test (Jenkins job). After each release, we only run the compatible test against the previous version.

public void addNewVersion(int ver, boolean isCompatibleWithPrev)

{

}

public boolean isCompatible(int srcVer, int targetVer)

{

}

1 -> 2 -> 3 -> 4 -> 5 -> 6

T T F T T

VersionCompatibilityManagement versions = new VersionCompatibilityManagement();

versions.addNewVersion(1, false);

versions.addNewVersion(2, true);

versions.addNewVersion(3, true);

versions.addNewVersion(4, false);

versions.addNewVersion(5, true);

versions.addNewVersion(6, true);

assert(versions.isCompatible(1, 3) == true);

assert(versions.isCompatible(3, 5) == false);

assert(versions.isCompatible(4, 2) == false); // downgrade

assert(versions.isCompatible(3, 3) == true); // upgrade to itself, always compatible


Interview 4 : System Design Interview


- Name : B***** Zh**** : Senior Software Engineer

- Discussion regarding existing application and current project architecture

- Design 1:1 chat system (designed as below)

Image: https://assets.leetcode.com/users/images/9cd12110-1b7e-489b-8f1d-80e10bada34b_1640893305.31972.png


Uber Offer


SDE II - L4

Uber Road safety team - Backend software Engineer

Job location : San Francisco

TC : 331k (153k + 500k (4 yrs) + 23k + 30k) (Base, stocks, Annual bonus, Sign-on Bonus))

Comments