Linkedin Interview Questions – Set 2

Online Coding Round:

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

Round 1:

Firstly, a discussion of projects in resume and a detailed chat on my internship. There was discussion on my project for about 15 mins . Since my project was based on web crawling he asked me Find top 10 urls used by clients and 10 clients accessing the urls for 1 day of data . I answered by using heap ,he asked to me ,how insertion works in a heap .
Q1. Search for an element in a pivoted array. (Only logic and pseudo code )
Q2. Find middle node of a linked list. (Tested a lot by asking questions)
Q3. LCA in binary tree. (Complete code was required).
Q4. A puzzle which I can’t recollect. (Was not common )
Q5. Some OS questions like mutex and paging.

Round 2:

Q1. N -ary tree given ,print the zig zag order traversal?
Q2. Given an sorted array find a pair such that their sum is equla to key value.
Q3. Given a tree check if it is a binary search tree or not constraints: space complexity O(1)

Round 3:

Q1. Convert a binary tree in Double Linked list. He then asked, how will you handle the case when the parent left and right pointers are changed, but children has not been processed yet?
Q2. Swap the even bits and odd bits in the number.
I/P: 01010101 O/P:10101010

Thanks Trapti for sharing your interview experience. CrazyforCode wishes you all the best for your future.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation