Introduction
I reviewed the mock interview this January 25, 2018 as an interviewee, I was asked to solve the algorithm to find shortest continuous subarray that contains all of the values from the set. After a few minutes to go over keywords, I told the interviewer that the algorithm is exactly the same one I practiced over 20 times last few months called "Find minimum substring containing all unique keys".
How to read the algorithm?
Here is what I did, I wrote down keywords:
Keywords:
given a set with integer -> >0, distinct
given an random integers
Ask for:
Shortest -> greedy
continuous -> stop ->
subarray ->
return subarray itself ->
minLength =
Algorithm review
I just copied my analysis with pseudo code from the mock interview. The interviewer told me to go over the algorithm with him using pseudo code, so I did explain the algorithm in detail.
Here is the mock interview practice.
No comments:
Post a Comment