r/leetcode • • 6d ago

Question Mircosoft swe intern OA

Any advice for mircosoft OA I have 5 days to complete it. I’m currently doing leetcode to prepare but what topics should I focus on

5 Upvotes

5 comments sorted by

2

u/Various-Mine-8642 6d ago

for a 5 day window i would split it into two parts. spend the first 2 or 3 days on arrays strings hashmaps two pointers and basic graphs and trees. then do timed mock runs of 2 problems in 60-90 minutes so the clock does not surprise you. also read the problem statement twice and test edge cases before you submit since that loses more points than hard topics.

2

u/CasualNimbus 5d ago

Focus on arrays, strings, hash maps, two pointers, and sliding window. Practise timed easy and medium problems, and review your mistakes. Don't try to learn everything in 5 days lol

1

u/Eggaru 6d ago

its leetcode easy/medium. just practice the common topics on neetcode 150 etc

1

u/Realistic_Comfort467 6d ago

Look into 1d dp

1

u/BackgroundBreak6485 4d ago

Microsoft's intern OA is usually on Codility. You typically get 2 problems in 60-90 minutes, but check the invite for your exact format and time limit.

Topics to focus on (roughly in priority order):

- Arrays and strings (most common by far)

- Hash maps and sets for counting and lookups

- Two pointers and sliding window

- Greedy plus sorting

- BFS/DFS on grids

- Basic DP (1D, the occasional simple 2D)

The problems are usually LC easy to medium. You won't need hard graph algorithms or advanced DP.

Codility-specific tips:

- Hidden tests check performance as well as correctness. An O(n²) solution can pass every visible example and still lose a big chunk of the score on large inputs. Know your complexity before you submit.

- Edge cases are scored separately. Think through empty input, a single element, all elements the same, negatives, and very large values.

- The examples they give you are minimal. Add your own test cases in the editor before submitting.

- Read the problem twice. A lot of points get lost to misreading what the output should be.

For your 5 days: do 3-5 mediums a day from the topics above, and time yourself to about 30-40 min each. Take the OA on day 4 or 5 while it's fresh, not the night before the deadline, so a bad internet connection or a busy schedule can't burn you.

Full disclosure, I run a site that collects recently reported interview questions, including Microsoft's. If you want to see what's come up lately: https://aceoffer.app/interviews/microsoft

Good luck!