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 401–425
Companies: Microsoft, Amazon, Bloomberg, Google +2
Hash Table · Prefix Sum · String
Return the longest prefix string common to all strings in the array, or an empty string if none exists. The task reduces to comparing characters…
Companies: Microsoft, Amazon, Apple, Bloomberg +3
Array · String · Trie
Find the length of the longest run of consecutive integers in an unsorted array, with an O(n) time requirement. The core idea is to detect…
Companies: Microsoft, Amazon, Bloomberg, Google +1
Array · Hash Table · Union-Find
Given a string s, return the longest substring that reads the same forwards and backwards. The core challenge is efficiently finding palindromic spans around centers…
Companies: Microsoft, Adobe, Amazon, Bloomberg +6
Dynamic Programming · Manacher · String · Two Pointers
Find the length of the longest substring that can be turned into all the same letter by performing at most k character replacements; this is…
Companies: Microsoft, D. E. Shaw, Goldman Sachs, Meta +1
Hash Table · Sliding Window · String
Find the length of the longest well-formed (balanced) parentheses substring in a string of '(' and ')', handling nested and adjacent valid segments; this typically…
Companies: Microsoft, Amazon, Meta, Uber
Bracket Sequences · Dynamic Programming · Stack · String
LRU Cache System Design LLD
Companies: Microsoft
Companies: Microsoft
Bit Manipulation · Greedy · String
Companies: Microsoft, Amazon
Array · Binary Search · Sorting · Two Pointers
Given a valid parentheses string, assign each character to one of two disjoint valid-parentheses subsequences A and B (output 0/1 per index) so that the…
Companies: Microsoft
Bracket Sequences · Stack · String
Companies: Microsoft
Array · Dynamic Programming · Greedy
Find the substring (overlaps allowed) that occurs most often in s among those with length between minSize and maxSize and at most maxLetters distinct characters…
Companies: Microsoft, Chewy, LinkedIn
Hash Table · Sliding Window · String
Companies: Microsoft, Google
Array · Dynamic Programming · Matrix
Companies: Microsoft
Array · Depth-First Search · Dynamic Programming · Tree
Given a list of intervals, merge all overlapping (including touching endpoints) intervals and return the minimal set of non-overlapping intervals that cover them. Key pattern…
Companies: Microsoft, Amazon, Antithesis, Apple +16
Array · Quicksort · Sorting
Companies: Microsoft, Adobe, Google, LinkedIn +2
Linked List · Recursion
Companies: Microsoft, Amazon, Google, Meta
Array · Hash Table · Math
Given a string of '(' and ')', return the minimum number of parentheses insertions needed to make the string valid. This is solved greedily by…
Companies: Microsoft, Meta
Bracket Sequences · Greedy · Stack · String
Partition the ordered list of jobs into d contiguous days (at least one job per day) to minimize the sum of daily difficulties, where each…
Companies: Microsoft, Atlassian
Array · Dynamic Programming
Companies: Microsoft, Amazon, Google
Array · Hash Table
Rearrange the array in-place to produce the lexicographically next greater permutation (using only O(1) extra space); if no larger permutation exists, reorder it to the…
Companies: Microsoft, Amazon, Bloomberg, Meta
Array · Two Pointers
Companies: Microsoft, Amazon, Bloomberg, Google +1
Dynamic Programming · Prefix Sum
Companies: Microsoft
Companies: Microsoft, eBay, Meta
Linked List · Recursion · Stack · Two Pointers
Determine whether an integer's digit sequence reads the same forwards and backwards (return false for negative numbers); the follow-up asks to do this without converting…
Companies: Microsoft, Amazon, Bloomberg, Google +1
Math