Microsoft SDE Real Interview Questions Set: Dependency Ordering, LRU Cache Design, Frequency Counting & More

13 Views
No Comments

Problem 1 — CICD Pipeline Dependency Ordering

CICD Pipeline:- Different environments.- If nothing is in prod theDatamine the order in which we should deploy our resources. Questions:1. What are the inputs? [A,B] where A and B are resources. A depends on B - list of lists where each inner list is a dependency pair and let's say we want to output w

This problem is a classic topological sorting question. Each pair [A, B] indicates that A depends on B, and the goal is to determine a valid deployment order. It tests understanding of DAGs, in-degree tracking, and queue-based processing.

Problem 2 — Design an Extensible LRU Cache

Design class structure and implement an LRU cache. Keep extensibility in mind, as we will follow up to add more eviction policies, like LFU.

This LRU Cache question emphasizes extensible class design, preparing for additional eviction policies like LFU in follow-up rounds. It tests O(1) operations using a doubly linked list plus hashmap, and object-oriented abstraction.

Problem 3 — Print Frequency of Numbers from 1 to

Given an array of N integers containing integers from 1 to N only. Some numbers may appear multiple times, some numbers may not appear. Write code to print out the count of times each number from 1 to N appears in the array. For example: PrintFrequency(new int[] {3, 1, 2});1 : 12 : 13 : 1 PrintFrequency(new int[] {2, 4, 4, 6, 6, 6});1 : 02 : 13 : 04 : 25 : 06 : 3

This problem checks the ability to count frequencies for numbers within a known range. A simple approach uses a count array, while an advanced O(1)-space solution leverages in-place marking.

The VOprep team has long accompanied candidates through various major company OAs and VOs, including Google, Amazon, Citadel, SIG, providing real-time voice assistance, remote practice, and interview pacing reminders to help you stay smooth during critical moments. If you are preparing for these companies, you can check out our customized support plans—from coding interviews to system design, we offer full guidance to help you succeed.

END
 0