亚麻 New Grad 三轮VO

第一轮:
BQ: 1. tell me a time you learned something new 2. tell me a time you went beyond expectation and outside your responsibility
Coding:
OOD design game for “call of duty”. How to create teams based on team size restriction and player level. Follow up: how to start play, 类似 merge k sorted list, 两个指针两两打

public ListNode mergeKLists(List<ListNode> lists) {
   if (lists.isEmpty()) return null;
   int end = lists.size() - 1;
   while (end > 0) {
      int begin = 0;
      while (begin < end) {
          lists.set(begin, merge2Lists(lists.get(begin),
          lists.get(end)));
          begin++;
          end--;
        }
   }
   return lists.get(0);
}

第二轮:
BQ: 1. tell me a time you work against tight deadline 2. tell me a time you made quick decision with limited information
Coding:

  1. single number
  2. Product of Array Except Self (deal with one or more zeros)

第三轮:
BQ: 1. tell me a time you work against tight deadline

Coding:

  1. sliding window with fixed size k, find distinct numbers for each window
  2. 2D array, 0 means healthy apples, 1 means rotten apples. BFS from rotten apples to 4 direction to rot neighboring apples. How many days to rot all apples. It is the same of breath in BFS.