Uber Technical Round | July 2022
Company: Uber
Role: Software Engineer II
Interview Stage: Phone Screen
Location: unknown
Year: 2022
Original Post Content:
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 occurrence 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 a positive array of length 26, find maximum possible substrings that are possible such that each character 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 the 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 BFS the string and store the permutation value for each character possible, not able to get the answer as my queue was exploding and not popping the value correctly. 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?