I was interviewd for google SDE position in March 2021 . I am sharing my interview experience here.
Initially a recruiter reached out to me and scheduled a phone interview . I scheduled it after a month. It was initial phone interview where I was shared a DSA problem.

Create an alogorithm to arrange the received packets of TCP/IP in ascending order. You will be receive the incoming packets continuously in random order (integer) eg. 9, 3, 4 ,7 etc and at any given time you should be returning the longest consecutive sub sequence in increasing order based on the inputs received. For Example :

  1. Input : 9 Current array:{9} Output: 0
  2. Input : 2 Current array:{9,2} Output: 0
  3. Input: 1 Current array:{9,2,1} Output: 1,2
  4. Input: 6 Current array:{9,2,1,6} Output: 1,2
  5. Input: 3 Current array:{9,2,1,6,3} Output: 1,2,3
  6. Input: 2 Current array:{9,2,1,6,2} Output: 1,2,3
Comments (3)