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

SDE - Intern

Editorialist YX
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: C++, OOPS, Data Structures, Algorithms,OS, DBMS Quantitative Aptitude
Tip
Tip

Tip 1 : Learn Data Structures and Algorithms. Practice atleast 300 (150 Medium + 100 Easy + 50 Hard) coding questions from Geeksforgeeks or Leetcode.
Tip 2 : Learn OOPS, OS, DBMS.
Tip 3 : Do atleast 2 projects.

Application process
Where: Campus
Eligibility: Above 8.5 CGPA
Resume Tip
Resume tip

Tip 1 : Don't mention unnecessary things on resume.
Tip 2 : Be precise and use good template.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date12 Sep 2020
Coding problem1

Proctored Online Test On Mettl.

1. Chocolate Problem

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

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date12 Sep 2020
Coding problem1

There were two Interviewers.
Interview started with an introduction.
Questions were asked from my projects.
Questions from Linked Lists, Trees, Graphs were asked.

1. Palindrome Linked List

Easy
20m average time
90% success
0/40
Asked in companies
AmazonAmerican ExpressThought Works

You are given a singly Linked List of integers. Your task is to return true if the given singly linked list is a palindrome otherwise returns false.

For example:
The given linked list is 1 -> 2 -> 3 -> 2-> 1-> NULL.

It is a palindrome linked list because the given linked list has the same order of elements when traversed forwards and backward​.
Follow Up:
Can you solve the problem in O(N) time complexity and O(1) space complexity iteratively?
Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date12 Sep 2020
Coding problem2

More questions from DSA were asked.
Questions from DBMS, SQL, OS were asked in the end.

1. M-Coloring Problem

Moderate
15m average time
85% success
0/80
Asked in companies
SamsungBank Of AmericaEditorialist YX

You are given an undirected graph as an adjacency matrix consisting of 'v' vertices and an integer 'm'.


You need to return 'YES' if you can color the graph using at most 'm' colors so that no two adjacent vertices are the same. Else, return 'NO'.


For example:
Input:
If the given adjacency matrix is:
[0 1 0]
[1 0 1]
[0 1 0] and 'm' = 3.

alt.txt

Output: YES

Explanation:
The given adjacency matrix tells us that 1 is connected to 2 and 2 is connected to 3. We can use three different colors and color all three nodes.
Hence we return true.


Try solving now

2. LRU Cache Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
OYOHikeOracle

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Try solving now

Here's your problem of the day

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

Skill covered: Programming

What is the purpose of the return keyword?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4782 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
1012 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6543 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3567 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15557 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15418 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10180 views
2 comments
0 upvotes