Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Google Summer Trainee Engineering Program(STEP) Interview Experience

  • Difficulty Level : Medium
  • Last Updated : 04 Jun, 2019

Telephonic Interview 1. (Telephonic + Google Docs Shared)

Q1. Given an array of integers, you need to find the local maxima.

Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!

Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!

Example : [1 3 5 4 7 10 6]

Output: 5 or 10

Explanation: Any of the local maxima can be the output. 
Here 5 is greater than 3 and 4, 10 is greater than 7 and 6. 

Hint : Refer this article.



Q2. Given a sequence of brackets, how will you identify if its valid or not.

Example : ({[][]})

Output: Valid

Explanation: Every opening bracket has a closing bracket.

Example: ({[]]}) 

Output: Invalid 

Explanation : Every opening bracket does not have a closing bracket.

Hint : Refer this article.

Telephonic Interview 2. (Telephonic + Google Docs Shared)

Q1. There are 2 arrays. Smaller is of size m and has m elements in sorted order. The bigger array is
of size m+n, where there are only n elements in initial n positions in sorted order. So, last m
positions are empty in the bigger array. Insert smaller array’s m elements in m + n array has all numbers in sorted order.

Example : 
Input Array    N[]={5, 9, 15, 20,,,,,, }  n=4
               M[]={1, 3, 6, 8, 19, 35}  m=6
Output array   N[]={1, 3, 5, 6, 8, 9, 15, 19, 20, 35}

Hint : Refer this article.

Q2. Given a binary tree with integer values, find the sub-path with the maximum value in it

   
Example : 
       1
     /   \ 
    2      3
  /   \  /   \
 4     5 6    7

Output : Max path is 5, 2, 1, 3, 7
Explanation : 5+2+1+3+7=18 is the maximum value that can spanned.

      -100
     /     \
    2        3
   /  \     /  \
  4    5   6    7

Output : Max path is 6, 3, 7
Explanation : 6+3+7=16 is the maximum value that can spanned.

Hint : Refer this article.

My Personal Notes arrow_drop_up
Recommended Articles
Page :