← Microsoft Interview Insights

Microsoft·Software Engineer·Onsite - Multi Round·Junior

JuniorPrefer not to say
Sep 2026United States

Summary

Went through three rounds of entry-level SDE interviews at Microsoft in the US, covering DSA, object-oriented design, system design, and CS fundamentals. Pretty well-rounded process, nothing too wild but the follow-ups kept things interesting.

Questions Asked (5)

Q1

Clone a linked list that has both next and random pointers.

Algorithms & Data Structures
Author's notes

The base problem is manageable if you've seen it before.

Create a free account to read the full note

Q2

What is the difference between authentication and authorization?

Technical Trade-offs
Author's notes

Straightforward.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining authentication and authorization, emphasizing that authentication verifies identity while authorization determines access rights. Then, illustrate the distinction with a concrete example, such as a user logging in (authentication) and then accessing a specific resource (authorization). Finally, discuss how they work together in a secure system, mentioning common protocols and best practices.

Pro tip: Relate the concepts to a real-world scenario like Amazon's IAM or API Gateway to show practical understanding. Also, mention that authentication always precedes authorization, but authorization can be context-dependent and dynamic.

1. Define Authentication

Explain that authentication is the process of verifying a user's identity, typically through credentials like passwords, biometrics, or tokens.

2. Define Authorization

Explain that authorization is the process of determining what an authenticated user is allowed to do, often based on roles, policies, or permissions.

3. Highlight the Relationship

Emphasize that authentication is a prerequisite for authorization; you must know who the user is before deciding what they can access.

4. Provide Examples

Give a concrete example, such as a user logging into a system (authentication) and then being granted access to specific API endpoints based on their role (authorization).

5. Discuss Implementation

Mention common technologies and standards, like OAuth 2.0 for authorization, OpenID Connect for authentication, and how they integrate in modern applications.

Key Points to Mention

  • Authentication verifies identity; authorization verifies permissions.
  • Authentication occurs first, followed by authorization.
  • Common authentication methods: passwords, biometrics, multi-factor authentication (MFA).
  • Common authorization models: role-based access control (RBAC), attribute-based access control (ABAC).
  • Protocols: OAuth 2.0 (authorization), OpenID Connect (authentication), SAML.
  • Security best practices: principle of least privilege, separation of concerns.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Explain the core principles of object-oriented programming.

Technical Trade-offs
Author's notes

Ran through encapsulation, inheritance, polymorphism, abstraction.

Create a free account to read the full note

Q4

Design a parking lot system, including classes, relationships, and how components interact.

System DesignTechnical Trade-offs
Author's notes

Classic OOD question and I knew it going in, which helped.

Create a free account to read the full note

Q5

Implement an LRU Cache from scratch.

Algorithms & Data StructuresSystem Design
Author's notes

Third round closer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: capacity, operations (get, put), and eviction policy. Then, describe the optimal data structure combination: a hash map for O(1) access and a doubly linked list for O(1) updates and evictions. Walk through the implementation details, including edge cases like updating existing keys and handling capacity limits.

Pro tip: Mention thread-safety considerations upfront, as production caches often need concurrent access. Also, discuss potential optimizations like using a sentinel head/tail to simplify edge cases.

1. Clarify Requirements

Ask about expected capacity, operations (get, put), and eviction policy (LRU). Confirm that get and put should be O(1) time complexity.

2. Choose Data Structures

Explain that a hash map alone is insufficient because it doesn't track order. Propose a combination: hash map for key-to-node mapping and a doubly linked list for recency order.

3. Design Operations

Detail how get and put work: on get, move the accessed node to the front (most recent); on put, add new node to front, and if capacity exceeded, remove the least recent node (tail).

4. Handle Edge Cases

Discuss updating an existing key (update value and move to front), and handling capacity of 0 or 1. Also, consider thread-safety if needed.

5. Analyze Complexity

Conclude that both get and put are O(1) time and O(capacity) space. Mention that this is optimal for LRU cache.

Key Points to Mention

  • Hash map provides O(1) access to nodes.
  • Doubly linked list maintains recency order and allows O(1) removal and insertion.
  • Sentinel nodes (dummy head and tail) simplify edge cases.
  • On get, move node to front; on put, add to front and evict from tail if over capacity.
  • Thread-safety can be achieved with locks or concurrent data structures.
  • Alternative implementations (e.g., OrderedDict in Python) exist but may not be allowed in interviews.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.