LinkedIn interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

LinkedIn
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Core Subjects
Tip
Tip

Tip 1 : Practice coding questions on Leetcode and GeeksforGeeks.
Tip 2 : Have a thorough understanding of all the core subjects.
Tip 3 : Do at least 2 good projects.

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

Tip 1 : Keep a one-page resume only. 
Tip 2 : Focus more on work experience and skills.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date5 Oct 2021
Coding problem2

This was the first interview round. The interview began with a brief introduction and then followed questions on data structures.

1. Paint House

Hard
20m average time
80% success
0/120
Asked in companies
AppleAmazonSamsung

You have been given ‘N’ houses, each house can be painted with any of three colours: green, red and yellow. You are also given a “cost” matrix of ‘N’ * 3 dimension which represents the cost of painting an i-th house (0-th based indexing) with j-th colour. The colour code is as follows: green - 0, red - 1 and yellow - 2. Now, you are supposed to find the minimum cost of painting all houses such that no adjacent houses are painted with the same colour.

Problem approach

I started with the brute force approach of using recursion and formulated a recursive function. The interviewer asked me to optimize the solution. So, I used dynamic programming. He asked me to code the function.

Try solving now

2. First and Last Position of an Element In Sorted Array

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

You have been given a sorted array/list 'arr' consisting of ‘n’ elements. You are also given an integer ‘k’.


Now, your task is to find the first and last occurrence of ‘k’ in 'arr'.


Note :
1. If ‘k’ is not present in the array, then the first and the last occurrence will be -1. 
2. 'arr' may contain duplicate elements.


Example:
Input: 'arr' = [0,1,1,5] , 'k' = 1

Output: 1 2

Explanation:
If 'arr' = [0, 1, 1, 5] and 'k' = 1, then the first and last occurrence of 1 will be 1(0 - indexed) and 2.


Problem approach

I could think of a solution using binary search for this question. So, I directly explained that approach. The interviewer was satisfied.
Time Complexity: O(logn)

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date6 Oct 2021
Coding problem2

This was the second interview round. We discussed one coding problem followed by some questions on the projects that I had done.

1. Edit Distance

Moderate
30m average time
70% success
0/80
Asked in companies
HCL TechnologiesGoogleInfosys

You are given two strings 'S' and 'T' of lengths 'N' and 'M' respectively. Find the "Edit Distance" between the strings.

Edit Distance of two strings is the minimum number of steps required to make one string equal to the other. In order to do so, you can perform the following three operations:

1. Delete a character
2. Replace a character with another one
3. Insert a character
Note:
Strings don't contain spaces in between.
Problem approach

I first thought of a recursive approach and formulated the recurrence relation. The interviewer was expecting an optimized dynamic programming solution, however, I was not able to completely build a dp solution.

Try solving now

2. Project Based Question

Why have you used MongoDB as the database? Difference between SQL and No-SQL database?

Problem approach

Tip 1 : Go through your projects thoroughly.
Tip 2 : You should be able to answer all questions related to the projects that you have done.

Here's your problem of the day

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

Skill covered: Programming

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by LinkedIn
908 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by LinkedIn
942 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by LinkedIn
790 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by LinkedIn
927 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)
5992 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
5242 views
3 comments
0 upvotes