Skip to content
Related Articles

Related Articles

Improve Article
LinkedIn Interview Experience | Set 4 (On-Campus)
  • Difficulty Level : Hard
  • Last Updated : 30 Aug, 2019

3 coding Questions in 1 hour :
1) Given a binary search tree and a key, if found return 1 else -1.
2) Given a string find the number of distinct substrings (should optimise time and space complexity)
3) Given a string finf the number of distinct palindromic substrings(should optimise time complexity)


Interview 1:
1) Given a boolean expression find the number of ways to paranthasise it so that it evaluates to true
2) Optimal Strategy for a Game
3) Given n stairs , you climb 1 , 2 or 3 stairs at a time . Find the number of ways to reach the nth step
Interview 2:
1) Given the pointer to the root of the tree and two values val1 and val2 . Find the length of path between the values val1 and val2 in the binary tree. { handle corner cases where both the values are on the same path}

2) Given a mapping between numbers and alphabets . Find the number of ways to decode a sequence of numbers

 eg: a - 21 b - 2 c - 54 d - 5 e -4 f-1
     1) ac
     2) ade
     3) bfc
     4) bfde
  4 ways to decode 

Interview 3:
1) Given a matrix of 0 s and 1 s Find the number of connected components having 1s

   0 0 1 0 1
   0 1 1 0 1
   0 0 0 1 1
   0 0 1 1 0 

The above matrix has 2 components
constraints: Time complexity O(N) space complexity O(1)

2) Given a tree check if it is a binary search tree or not constraints: space complexity O(1)

Interview 4: (HR+Technical)

1) Asked questions on my resume and challenges faced in my project
2) Showed me page and asked me how to design the backend database so that it supports functions like displaying entire information about a product , its average rating and number of customers who gave each rating etc.

Overall the experience was good and the interviewers were friendly. I would like to thank which helped me throughout my preparation.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :