Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
LinkedIn interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

LinkedIn
upvote
share-icon
3 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Referral
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Medium
Face to Face
Duration60 minutes
Interview date25 May 2015
Coding problem3

Technical round with questions based on DSA. Also, there was a discussion on my BTP project.

1. Longest Palindromic Subsequence

Hard
45m average time
50% success
0/120
Asked in companies
MicrosoftQualcommHike

You have been given a string ‘A’ consisting of lower case English letters. Your task is to find the length of the longest palindromic subsequence in ‘A’.

View more
Problem approach

The brute force solution is based on the idea that if the two ends of a string are the same, then they must be included in the longest palindrome subsequence. Otherwise, both ends cannot be included in the longest palindrome subsequence. So, recursion can be used here. 
Time Complexity of this approach would be exponential. 

This solution can be optimized using dynamic progr...

View more
Try solving now

2. Convert A Given Binary Tree To Doubly Linked List

Moderate
15m average time
80% success
0/80
Asked in companies
FacebookMicrosoftAmazon

Given a Binary Tree, convert this binary tree to a Doubly Linked List.

A Binary Tree (BT) is a data structure in which each node has at most two children.

View more
Problem approach

The idea is to traverse all the leaves and connect them by changing their left and right pointers. We also need to remove them from the Binary Tree by changing left or right pointers in parent nodes. 
One way to solve this is to add the leaves at the beginning of the current linked list and update the head of the list using the pointer to head pointer. Since we insert at the beginning, ...

View more
Try solving now

3. Palindrome Permutation

Easy
15m average time
85% success
0/40
Asked in companies
MicrosoftFacebookApple

You are given a string 'S', check if there exists any permutation of the given string that is a palindrome.

Note :

1. A palindrome is a word or phr...
View more
Problem approach

The brute force solution is to run two loops, the outer loop picks all characters one by one, the inner loop counts the number of occurrences of the picked character. We keep track of odd counts. Time complexity of this solution is O(n2). 
We can do it in O(n) time using a count array. 
Steps : 
1. Create a count array of alphabet size which is typically 256. Initialize ...

View more
Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date25 May 2015
Coding problem3

Technical interview round where the interviewer asked me questions based on DSA , algorithms and my project. Large set of questions pertaining to DBMS.

1. Serialize/Deserialize The Binary Tree

Hard
15m average time
85% success
0/120
Asked in companies
DunzoLinkedInShareChat

You have been given a binary tree of integers. You are supposed to serialize and deserialize (refer to notes) the given binary tree.


View more
Problem approach

Recursion can be used here. Once the parent node is processed, make recursive calls for the children node. 
For serializing the tree into a list : 
• If node is null, store -1 in list and return
• Store the data at current node in list.
• Call function recursively for left and right subtrees.
• Return the list.
For deserializing the list into a tree : 
• If t...

View more
Try solving now

2. Shuffle Two Strings

Hard
50m average time
50% success
0/120
Asked in companies
GoogleTata Consultancy Services (TCS)Accenture

You are given three strings “A”, “B” and “C”. Y...

View more
Problem approach

The idea is to start from the last element, swap it with a randomly selected element from the whole array (including last). Now consider the array from 0 to n-2 (size reduced by 1), and repeat the process till we hit the first element. 
Algorithm : 

To shuffle an array a of n elements (indices 0..n-1):
for i from n - 1 down to 1 do
j = random integer with 0 <= j <...

View more
Try solving now

3. Technical Question

What is rolling hash? Any application of rolling hash?

Problem approach

A rolling hash is a hash function where the input is hashed in a window that moves through the input.
A few hash functions allow a rolling hash to be computed very quickly—the new hash value is rapidly calculated given only the old hash value, the old value removed from the window, and the new value added to the window—similar to the way a moving average function can be computed much more qu...

View more
03
Round
Medium
Face to Face
Duration60 minutes
Interview date25 May 2015
Coding problem3

This was a design round where I was grilled on my internship , projects and some new design questions were also asked.
Q1. Design a work flow model of the entire work done in your internship.
Q2. Design a workflow model of any one of the projects you did.

1. System Design Question

A map based design for implementing a code to check for isomorphic words in a file

Problem approach

Tip 1: Mapping of current characters can be stored in a map. 
To check for two strings to be isomorphic using a map :
1) If lengths of str1 and str2 are not same, return false.
2) Do following for every character in str1 and str2
a) If this character is seen first time in str1, then current of str2 must have not appeared before.
(i) If current character of str2 is seen, retu...

View more

2. System Design Question

You need to present a ppt to say N users who are viewing it live in their browsers. What you have is a web page where the ppt is opened and has say two buttons : next and previous. You need to design basically what will happen / how will pressing of the buttons reflect a change across all the users.( He wanted something as to how the DNS on processing the next request would change the URL and c...

View more
Problem approach

Tip 1:Before you jump into the solution always clarify all the assumptions you’re making at the beginning of the interview. Ask questions to identify the scope of the system. This will clear the initial doubt, and you will get to know what are the specific detail interviewer wants to consider in this service.
Tip 2 : Design your structure and functions according to the requirements and try t...

View more

3. Design a stack that supports getMin() in O(1) time and O(1) extra space

Moderate
15m average time
85% success
0/80
Asked in companies
RazorpayFlipkartAdobe

Create a stack data structure that allows operations such as push (adding an element), pop (removing the top element), top (retrieving the top element), and also provides a w...

View more
Problem approach

Use two stacks: one to store actual stack elements and the other as an auxiliary stack to store minimum values. 
The idea is to do push() and pop() operations in such a way that the top of the auxiliary stack is always the minimum. 

Push(int x) // inserts an element x to Special Stack 
1) push x to the first stack (the stack with actual elements) 
2) compare ...

View more
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

What is the return type of a method that doesn't return any value?

Start a Discussion
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by LinkedIn
723 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by LinkedIn
629 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by LinkedIn
735 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by LinkedIn
685 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
5337 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
4494 views
3 comments
0 upvotes