Skip to content

Microsoft Placement Papers 2024

Overview

This page collects Microsoft placement papers from 2024 with previous-year questions, solutions, and the 2024 exam pattern. It is useful when you want real drive history: what the OA looked like, which question types repeated, and how solutions were approached. Work through the papers below to build speed and accuracy, then compare against newer 2025 material so your prep matches both established Microsoft patterns and the latest shifts.

Microsoft Online Assessment 2024 pattern

Section Questions Time Difficulty Focus Areas
Coding Problem 1 1 20 min Medium Arrays, strings
Coding Problem 2 1 20 min Medium Trees, graphs
Coding Problem 3 1 25 min Hard Dynamic programming
Coding Problem 4 1 25 min Hard Advanced DSA

Total: 3-4 problems, 60-90 minutes

Platform: Microsoft Codility or HackerRank
Languages Allowed: C++, Java, Python, C#
Success Rate: ~15-20% cleared OA and advanced to interviews

Microsoft Placement Papers 2024 - actual questions & solutions

This section contains practice questions styled on Microsoft placement papers 2024 (previous-year pattern), with worked solutions. Use them as timed sectional drills - from student reports drives vary by college and role, so treat this as a high-signal practice bank, not an official paper dump.

Question 1: longest common prefix

Show solution

Problem Statement: Find the longest common prefix string amongst an array of strings.

Example:

Input: ["flower","flow","flight"]
Output: "fl"

Solution (Java):

public String longestCommonPrefix(String[] strs) {
if (strs.length == 0) return "";
String pref = strs[0];
for (int i = 1; i < strs.length; i++) {
while (!strs[i].startsWith(pref)) {
pref = pref.substring(0, pref.length() - 1);
if (pref.isEmpty()) return "";
}
}
return pref;
}

Time Complexity: O(S)
Space Complexity: O(1)

Question 2: merge two sorted lists

Show solution

Problem Statement: Merge two sorted linked lists and return a new sorted list.

Example:

Input: 1→2→4 , 1→3→4
Output: 1→1→2→3→4→4

Solution (Java):

public ListNode mergeTwoLists(ListNode a, ListNode b) {
ListNode dummy = new ListNode(0), cur = dummy;
while (a != null && b != null) {
if (a.val <= b.val) { cur.next = a; a = a.next; }
else { cur.next = b; b = b.next; }
cur = cur.next;
}
cur.next = (a != null) ? a : b;
return dummy.next;
}

Time Complexity: O(n + m)
Space Complexity: O(1)

Question 3: two sum

Show solution

Problem Statement: Given an array of integers and a target, return indices of two numbers that add up to target.

Example:

Input: nums = [2, 7, 11, 15], target = 9
Output: [0, 1]

Solution (Java):

public int[] twoSum(int[] nums, int target) {
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < nums.length; i++) {
int need = target - nums[i];
if (map.containsKey(need)) return new int[]{map.get(need), i};
map.put(nums[i], i);
}
return new int[]{};
}

Time Complexity: O(n)
Space Complexity: O(n)

Question 4: rotate array right by k

Show solution

Problem Statement: Rotate the array to the right by k steps.

Example:

Input: [1,2,3,4,5,6,7], k = 3
Output: [5,6,7,1,2,3,4]

Solution (Java):

public void rotate(int[] nums, int k) {
k %= nums.length;
reverse(nums, 0, nums.length - 1);
reverse(nums, 0, k - 1);
reverse(nums, k, nums.length - 1);
}
void reverse(int[] a, int l, int r) {
while (l < r) { int t = a[l]; a[l++] = a[r]; a[r--] = t; }
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 5: maximum subarray sum

Show solution

Problem Statement: Find the contiguous subarray with the largest sum.

Example:

Input: [-2, 1, -3, 4, -1, 2, 1, -5, 4]
Output: 6 // [4, -1, 2, 1]

Solution (Java):

public int maxSubArray(int[] nums) {
int best = nums[0], cur = nums[0];
for (int i = 1; i < nums.length; i++) {
cur = Math.max(nums[i], cur + nums[i]);
best = Math.max(best, cur);
}
return best;
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 6: first non-repeating character

Show solution

Problem Statement: Return the first non-repeating character in a string, or ‘_’ if none.

Example:

Input: "swiss"
Output: 'w'

Solution (Java):

public char firstUnique(String s) {
int[] freq = new int[256];
for (char c : s.toCharArray()) freq[c]++;
for (char c : s.toCharArray()) if (freq[c] == 1) return c;
return '_';
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 7: climbing stairs

Show solution

Problem Statement: You can climb 1 or 2 steps. How many distinct ways to climb n stairs?

Example:

Input: n = 4
Output: 5

Solution (Java):

public int climbStairs(int n) {
if (n <= 2) return n;
int a = 1, b = 2;
for (int i = 3; i <= n; i++) {
int c = a + b; a = b; b = c;
}
return b;
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 8

Q8: Which normal form removes transitive dependency?

Solution:

1NF: atomic values. 2NF: no partial dependency. 3NF: no transitive dependency.

Answer: 3NF

Question 9

Q9: Worst-case time complexity of quicksort is?

Solution:

Unbalanced partitions (already sorted with bad pivot) → O(n²).

Answer: O(n²)

Question 10

Q10: Which protocol is connection-oriented at the transport layer?

Solution:

TCP is connection-oriented; UDP is connectionless.

Answer: TCP

Question 11

Q11: Time complexity of binary search on a sorted array of n elements is?

Solution:

Each step halves the search space → O(log n).

Answer: O(log n)

Hiring volume

  • Total Hires: 1,500+ freshers in India
  • SDE-1: 1,200+ selections
  • SDE-2: 300+ selections

Salary packages

  • SDE-1: ₹45-55 LPA total compensation
  • SDE-2: ₹60-75 LPA total compensation

Question difficulty

  • Medium: 50% of questions
  • Hard: 50% of questions
  • Focus: DSA and system design

Key insights from 2024 Microsoft Online Assessment

  1. Coding Section is Critical: Must solve 3-4 coding problems correctly to advance
  2. DSA Focus: Strong emphasis on arrays, trees, graphs, and dynamic programming
  3. Structured Thinking: Microsoft values structured problem-solving approach
  4. Azure Knowledge: Cloud knowledge (Azure) is beneficial for many roles
  5. Time Management: 60-90 minutes for 3-4 problems requires excellent speed
  6. Difficulty Level: Microsoft interviews rated 3.1/5 difficulty
  7. Success Rate: Only 15-20% cleared OA and advanced to interviews
  8. Balance Innovation with Stability: Microsoft values structured thinkers who balance innovation with stability

Microsoft 2024 interview experiences

Based on candidate experiences from 2024 Microsoft interviews:

2024 Interview Process:

  1. Online Assessment (60-90 minutes): 3-4 coding problems
  2. Technical Phone Screen (45-60 minutes): Coding problems, algorithm discussions
  3. Onsite Interviews (4-5 rounds, 45 minutes each):
  • Coding rounds (2-3): Algorithms, data structures, problem-solving
  • System Design round: For experienced candidates
  • Behavioral round: STAR method, collaboration, innovation

Common 2024 Interview Topics:

  • Coding: Arrays, trees, graphs, dynamic programming, LRU Cache
  • System Design: Scalable systems, Azure cloud architecture
  • Behavioral: Collaboration examples, innovation stories, structured thinking
  • Azure Cloud: Cloud computing concepts for relevant roles

2024 Interview Questions Examples:

  • “Implement LRU Cache” (Coding)
  • “Binary Tree Maximum Path Sum” (Coding)
  • “Design a product for job seekers to create resumes” (Product Design)
  • “How would you improve Outlook for vacation email overload?” (Product Thinking)

Success Tips:

  • Strong coding performance is essential - solve problems with structured approach
  • Practice LeetCode Medium problems - Microsoft focuses on medium difficulty
  • Learn Azure cloud knowledge for relevant roles
  • Prepare STAR stories demonstrating structured thinking and collaboration
  • Balance innovation with stability in your examples
  • Practice explaining your problem-solving approach clearly

Difficulty Rating: 3.1/5

For detailed interview experiences, visit Microsoft Interview Experience page.

Preparation tips for Microsoft 2024 pattern

  1. Master Coding Fundamentals: Focus on solving 3-4 coding problems correctly - arrays, trees, graphs, DP
  2. Practice Previous Year Papers: Solve Microsoft OA papers from 2020-2024 to understand patterns
  3. Time Management: Practice completing 3-4 coding problems in 60-90 minutes
  4. LeetCode Medium Focus: Solve 200+ LeetCode Medium problems - Microsoft’s sweet spot
  5. Azure Cloud Knowledge: Learn Azure cloud concepts for relevant roles
  6. Structured Thinking: Practice structured problem-solving approach
  7. System Design Basics: Learn scalable system design and Azure architecture
  8. Behavioral Prep: Prepare STAR stories demonstrating collaboration and innovation
  9. Mock Tests: Take timed practice tests to improve speed and accuracy
  10. Balance Examples: Prepare examples showing balance between innovation and stability

Comments & Suggestions

Similar companies

Google · Amazon · Meta · TCS · Infosys · Wipro