Uber Technical Round | July 2022

Anonymous User
1681
Jul 21, 2022
Aug 05, 2022

Exp: 6+yrs Msft SE II L61

SE II Uber

Uber Coding Round Online
https://leetcode.com/discuss/interview-question/1515709/uber-codesignal-oa-se-2

Uber Tech Round 1:

Given a stream of infinite list of words starting from time 0, find the maximum frequency K words for a given list of range of hours.
solved using min heaps, sets and dictionary where I store the occurance in dictionary and create heap of size K for every hour, and use set to store those K values for optimal solution.(max 24hr history to be maintained)

Uber Tech Round 2 :

Given a string and an positive array of length 26, find maximum possible substrings that are possible such that each character is can be arranged in the substring with maximum length present in the array.
Ex :
"aab" , [2,1,0,0,0,..0]
result = length[('a' 'a' 'b'), ('aa','b)]
"aaba", [3,1,0,0,0...0]
result = length[('aa','b','a'), ('a', 'ab','a'), ('a','a','b', 'a'), ('aa', 'ba')]

Note: Not sure if the example clarifies the question but point is that array contains the max value of substring that a character can have so if a[0] = 3 so 'a' can occur in substring with max length 3 and if a[1]=2 then 'b' can be included in the substrings with max length 2

I used DP and Queue where I will bsf the string and store the permutation value for each charcter possible, not able to get the answer as my que was exploading and not poping the value corretly. Let me know if there is a similar problem, not able to find the solution for this.

What are my chances here to get to the Design and HM Round?

Comments (5)