Explore questions associated with Microsoft. Review the source details, then use the workspace for code, notes, and diagrams.
454 questions in the library. A source association does not guarantee a future interview question.
Behavioral and leadership · Coding · Machine learning · ML system design · Object-oriented design · Other questions · Practical engineering · System design
Loading questions…
Showing 426–450
Determine whether the array can be partitioned into two subsets with equal sum — equivalently, check if there exists a subset that sums to half…
Companies: Microsoft, Google
0-1 Knapsack · Array · Dynamic Programming · Knapsack Problem
Given a sorted array, remove duplicates in-place so each unique value appears only once (preserving order) and return the count k of unique elements. This…
Companies: Microsoft, Bloomberg, Google, Meta
Array · Two Pointers
Reverse the digits of a signed 32-bit integer, preserving the sign, and return the reversed number or 0 if reversing would overflow the 32-bit signed…
Companies: Microsoft, Bloomberg, eBay, Google +2
Math
Convert a valid Roman numeral string into its integer value by applying the additive and subtractive rules (e.g., IV = 4, IX = 9, CM…
Companies: Microsoft, Google
Hash Table · Math · String
Given an m×n matrix where each row is sorted and the first element of each row is greater than the last of the previous row…
Companies: Microsoft, Amazon, Goldman Sachs, Meta +1
Array · Binary Search · Matrix
Given an array nums of length 2n structured as [x1,...,xn,y1,...,yn], return a new array that interleaves the two halves into [x1,y1,x2,y2,...,xn,yn].
Companies: Microsoft
Array
Companies: Microsoft, Amazon, Bloomberg, Google
Array · Hash Table
Companies: Microsoft, Bloomberg, Google
Array · Prefix Sum
Reorder an array of values 0, 1, and 2 in-place so all 0s come first, then 1s, then 2s (the Dutch National Flag problem); aim…
Companies: Microsoft, Amazon, Google, Walmart Labs
Array · Bubble Sort · Quicksort · Sorting
Split the array into k non-empty contiguous subarrays so that the maximum subarray sum is as small as possible, and return that minimized largest sum…
Companies: Microsoft, Amazon, Google, Pinterest +2
Array · Binary Search · Dynamic Programming · Greedy
Companies: Microsoft, Amazon
Array · Hash Table · Prefix Sum
Companies: Microsoft
AI Product Management · Privacy & Compliance
Count the number of contiguous, non-empty subarrays whose elements sum to k. Because nums can include negatives (so two-pointer sliding window doesn't work), use cumulative…
Companies: Microsoft, Amazon, Apple, Bloomberg +3
Array · Hash Table · Prefix Sum
Companies: Microsoft, Amazon, Bloomberg, Google
Array · Math · Number Theory · Simulation
Companies: Microsoft
Companies: Microsoft
Companies: Microsoft
Companies: Microsoft
Companies: Microsoft, Amazon, Bloomberg, Google
Dynamic Programming · Math
Given an array of integers and a target, return the indices of two distinct elements whose values sum to the target (exactly one valid solution…
Companies: Microsoft, Amazon, Apple, Bloomberg +13
Array · Hash Table
Determine whether two strings are anagrams — i.e., contain the same multiset of characters — by comparing their character frequency distributions (or sorted forms). Inputs…
Companies: Microsoft, Amazon, Google, Meta +1
Hash Table · Sorting · String