Skip to content

Latest commit

 

History

History
 
 

LinkedIn

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

LinkedIn Interview Questions


Coding round questions

  • Given a binary search tree and a key, if key is found in tree, return 1 else -1.

  • Given a string, find the number of distinct substrings (should optimise time and space complexity)

  • Given a string, find the number of distinct palindromic substrings (should optimise time complexity)


Technical Interview Questions
Data Structures and Algorithms

  • Given a boolean expression, find the number of ways to parenthesise it so that it evaluates to true.

  • Optimal Strategy for a Game. (You are given an array A of size N. The array contains integers and is of even length. The elements of the array represent N coin of values V1, V2, ....Vn. You play against an opponent in an alternating way. In each turn, a player selects either the first or last coin from the row, removes it from the row permanently, and receives the value of the coin. You need to determine the maximum possible amouint of money you can win if you go first.)

  • Given n stairs , you climb 1 , 2 or 3 stairs at a time . Find the number of ways to reach the nth step.

  • 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}

  • Given a mapping between numbers and alphabets. find the number of ways to decode a sequence of numbers

  • Given a matrix of 0 s and 1 s Find the number of connected components having 1s

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

Miscellaneous

  • Asked questions on my resume and challenges faced in my project. Other behavioral question.