VMware | OA | New grad | May 2020
Anonymous User
4015
  1. 6 multiple choice questions - were supposed to be simple but 1 or 2 had a frustrating lack of details which led to guess-work
  2. 3 coding questions -
    a) Same as https://leetcode.com/problems/rearrange-words-in-a-sentence/
    b) Given an expression consisting of '<'s and '>'s and also given that '>' can be replaced by '<>', return whether the expression can be balanced in at most k replacements (balanced means every '<' is matched by a '>' and a '>' matches the most recent '<').
    Example:
    "<><>", k = 2: return true since the expression is already balanced.
    "<>>", k = 1: return true since the last '>' can be replaced by a '<>' thus making the expression balanced.
    ">><>", k= 1: return false since the first two '>'s should be replaced by '<>' i.e. 2 replacements are needed but k is only 1.
    ">><", k=50: return false since this expression can never be balanced as '<'s are not replaceable and hence will never be matched.
  3. Same as https://leetcode.com/discuss/interview-question/278341/Uber-phone-interview-Number-of-distinct-subarrays-with-at-most-k-odd-elements/ (Note that the question does specify distinct so it is not similar to this.
Comments (4)