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

SDE - 1

Microsoft
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey with primary C language with other basic kinds of stuff like how to work with arrays and loops. after that, I focused 6 months on data structure and algorithm, and during these 6 months, I started giving contests on CodeChef and Codeforces. Initially, I could not do well, but after giving some contests, I could perform well.
Application story
This was an on-campus opportunity. I applied through the college placement cell. The first resume shortlisting was performed. After the online test 15 candidates were selected for interviews.
Why selected/rejected for the role?
I was able to answer all the questions of the interviewer but I think I was not much proficient in writing good-quality code.
Preparation
Duration: 6 Months
Topics: Data Structure, Algorithm, OOPS, DP, Puzzles
Tip
Tip

Tip 1 : Don't waste much time on easy questions
Tip 2 : If you can't make a solution to the problem. Check out other's solution
Tip 3 : Do some good projects

Application process
Where: Campus
Eligibility: 1) 7 CPI and above
Resume Tip
Resume tip

Tip 1 : Write only those skills in which you are confident
Tip 2 : Have a variety of achievements in your resume

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 Minutes
Interview date3 Aug 2022
Coding problem2

This was an online coding round with 2 coding questions.

1. Maximum Consecutive Ones

Easy
0/40
Asked in companies
AmazonOlaZivost Technologies

You are given an array ‘ARR’ of length ‘N’ consisting of only ‘0’s and ‘1’s. Your task is to determine the maximum length of the consecutive number of 1’s.


For Example:
ARR = [0, 1, 1, 0, 0, 1, 1, 1], here you can see the maximum length of consecutive 1’s is 3. Hence the answer is 3.
Try solving now

2. Jump Game

Moderate
15m average time
85% success
0/80
Asked in companies
Deutsche BankGoldman SachsAmazon

You have been given an array 'ARR' of ‘N’ integers. You have to return the minimum number of jumps needed to reach the last index of the array i.e ‘N - 1’.


From index ‘i’, we can jump to an index ‘i + k’ such that 1<= ‘k’ <= ARR[i] .


'ARR[i]' represents the maximum distance you can jump from the current index.


If it is not possible to reach the last index, return -1.


Note:
Consider 0-based indexing.
Example:
Consider the array 1, 2, 3, 4, 5, 6 
We can Jump from index 0 to index 1
Then we jump from index 1 to index 2
Then finally make a jump of 3 to reach index N-1

There is also another path where
We can Jump from index 0 to index 1
Then we jump from index 1 to index 3
Then finally make a jump of 2 to reach index N-1

So multiple paths may exist but we need to return the minimum number of jumps in a path to end which here is 3.
Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date4 Aug 2022
Coding problem2

1. Search In A Row Wise And Column Wise Sorted Matrix

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

You are given an 'N * N' matrix of integers where each row and each column is sorted in increasing order. You are given a target integer 'X'.


Find the position of 'X' in the matrix. If it exists then return the pair {i, j} where 'i' represents the row and 'j' represents the column of the array, otherwise return {-1,-1}


For example:
If the given matrix is:
[ [1, 2, 5],
  [3, 4, 9],
  [6, 7, 10]] 
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
Try solving now

2. System Design Question

Implement Text Editor

Problem approach

I have a solution using file, pointer, stack and linked list

03
Round
Medium
Video Call
Duration60 Minutes
Interview date4 Aug 2022
Coding problem1

1. LRU Cache Implementation

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

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.
Problem approach

I wrote a code with the help of set and map

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

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
5 rounds | 15 problems
Interviewed by Microsoft
4035 views
0 comments
0 upvotes
company logo
SDE - 1
5 rounds | 7 problems
Interviewed by Microsoft
2660 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Microsoft
7425 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Microsoft
1272 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes
company logo
SDE - 1
3 rounds | 11 problems
Interviewed by Amazon
21829 views
4 comments
0 upvotes