Microsoft Online Assessment | Senior Software Engineer

microsoft logo
microsoft
senior software engineerrejected
August 22, 202529 reads

Summary

I recently attempted the Microsoft coding assessment for a senior software engineer role. The process was extremely challenging, with two complex problems that tested my problem-solving abilities. Despite the difficulty, I was unable to complete the problems within the time limit, leading to a negative outcome.

Full Experience

Hi All,

Recently I gave coding assessment of microsoft

problem1:

Find a subsequence of skills , call it x of length m such that there are at most k indices where x[i]!=x[i+1] for all 0<=i

example:

skills [1,1,2,3,2,1]

k=2

ans=5

Explanation: the longest possible subsequence: 1 1 2 2 1

Note: I dont remember the complete problem statement.

problem 2:

Count distinct arrays of length n[i] with values in [1... m[i]] such that cost of finding the maximum element equals totalCost[i]

input:

[2,3,4][3,3,3] [1,2,2]

ans: [3 1 6]

explanation:

i=0

n=2 ,m=3 cost=1

possible arrays:

1,2

2,3

1,3

i=1

n=3, m=3 cost=2

possible arrays: [1,2,3]

i=2

n=4, m=3 cost=2

possible arrays:

[1,1,2,3] [1,1,2,4] [1,1,3,4]

[2,2,3,4] [1,2,2,4] [1,3,3,4]

**Microsoft could have directly rejected me ...instead of cooking my brain for 105 mins**

Interview Questions (2)

Q1
Longest Subsequence with Limited Transitions
Data Structures & Algorithms

Find a subsequence of skills, call it x of length m such that there are at most k indices where x[i] != x[i+1] for all 0 <= i < m.

Q2
Count Distinct Arrays with Specific Cost Conditions
Data Structures & Algorithms

Count distinct arrays of length n[i] with values in [1... m[i]] such that the cost of finding the maximum element equals totalCost[i].

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!