practice a little every day, paws crossed ♡
Coding & Algorithms Interview Questions
Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.
- 9403
- Questions
- 546
- Companies
- 11
- Topics
- 8
- Languages
Showing 1891–1920 of 3276 results
- MicrosoftMediumSoftware EngineerMinimize the Largest Value When Picking at Least k Non-Adjacent Houses
Pick at least k houses from a row without choosing two neighbors, so that the largest amount in any chosen house is as small as possible, and return that minimum. With up to 100,000 houses and values up to one billion, the task tests reasoning about a min-max objective under an adjacency constraint.
Coding & AlgorithmsOnline Assessment - MicrosoftMediumSoftware EngineerMinimum Number of Rooms to Host Overlapping Meetings
A scheduling problem that asks for the fewest rooms needed to hold a set of meetings given as half-open time intervals, where a room freed at a given moment can be reused immediately. It tests interval reasoning, correct handling of shared endpoints and duplicates, and an efficient solution for large inputs.
Coding & AlgorithmsOnsite - MicrosoftMediumSoftware EngineerMinimum Ship Capacity to Deliver Ordered Packages Within a Day Limit
Given package weights in a fixed loading order and a number of days, find the smallest ship capacity that delivers every package within that many days, carrying one contiguous run of packages per day. It tests reasoning precisely about feasibility, choosing correct bounds and handling large inputs efficiently.
Coding & AlgorithmsOnsite - MicrosoftMediumSoftware EngineerMinimum total cost to convert one string into another using weighted character rules
A string transformation problem: convert a source string into a target string using directed, weighted character replacement rules that may be chained at a position. It tests reasoning about multi-step conversions, choosing the cheapest of duplicate rules, detecting impossible positions, and totals beyond the 32-bit range.
Coding & AlgorithmsOther - MicrosoftMediumSoftware EngineerMost Frequent Substring Under Distinct-Letter and Length Limits
Find how often the most frequent eligible substring appears in a lowercase string, where an eligible substring has a length within a given range and no more than a set number of distinct letters. Overlapping occurrences count and inputs reach 100,000 characters, so the task tests efficient substring counting.
Coding & AlgorithmsOnline Assessment - MicrosoftMediumSoftware EngineerMost Frequent Substring Within a Length Range and a Distinct-Letter Limit
A string coding problem: among all substrings whose length falls in a given range and that use at most a given number of distinct letters, return how many times the most frequent one occurs. It tests handling overlapping occurrences and the distinct-letter limit, counting efficiently on strings of up to 100,000 characters, and returning zero when nothing qualifies.
Coding & AlgorithmsOnline Assessment - MicrosoftMediumSoftware EngineerParse a Signed Integer in an Arbitrary Base
Parse signed integers in bases 2–36 with explicit syntax, negative-boundary handling, pre-arithmetic overflow checks, and deterministic error precedence.
Coding & AlgorithmsTechnical Screen - MicrosoftMediumSoftware EngineerPopulate next pointers in a perfect binary tree
Evaluates proficiency in tree traversal and in-place pointer manipulation, emphasizing the perfect binary tree invariant and space-time trade-offs; category/domain: Coding & Algorithms. It is commonly asked because it tests ability to perform level-wise linking under an O(1) extra-space constraint and operates at the implementation-level of algorithms and data structures.
Coding & AlgorithmsOnsite - MicrosoftMediumData ScientistPrint Org Chart by Level
This problem tests your ability to model a tree structure from flat parent-child relations and perform a level-order traversal to format hierarchical data.
Coding & AlgorithmsTechnical ScreenTreesBFSGraphs - MicrosoftMediumSoftware EngineerRecover Sorted Digits from Scrambled English Number Words
Recover sorted digits from scrambled English number-word letters, including repeats, and analyze why arbitrary customer vocabularies may lose unique recoverability.
Coding & AlgorithmsOnsite - MicrosoftHardSoftware EngineerReturn Top K Open Businesses
This problem tests your ability to filter data streams and maintain a top-K collection using a priority queue with custom sorting logic.
Coding & AlgorithmsTechnical ScreenSortingHeapsFiltering - MicrosoftHardSoftware EngineerReturn a topological ordering of a graph
This question tests the ability to implement Kahn's algorithm or a DFS-based approach to perform a topological sort while correctly handling cycle detection.
Coding & AlgorithmsTechnical ScreenGraphTopological SortKahn's Algorithm - MicrosoftMediumMachine Learning EngineerReturn the k most frequent values in an array with a deterministic tie rule
Return the k values that occur most often in an integer array, ranked by frequency with ties broken by the smaller value. It tests frequency counting, selecting the top k efficiently and producing a deterministic order when several values tie at the cutoff.
Coding & AlgorithmsTechnical Screen - MicrosoftMediumSoftware EngineerReturn the k values in a sorted array closest to a target, with smaller-value ties
Given a sorted integer list, a count k and a target value, return the k elements closest to the target in ascending order. The problem tests a precise tie rule that favors smaller values, duplicate values, targets outside the array's range, and working efficiently on already sorted input.
Coding & AlgorithmsOther - MicrosoftMediumSoftware EngineerReverse linked list in fixed-size groups
This question evaluates proficiency with singly linked list manipulation, pointer/reference management, in-place group operations, and complexity reasoning including time and constant extra space.
Coding & AlgorithmsOnsite - MicrosoftMediumSoftware EngineerRotate a 3×3 digit grid by 180°
This problem tests your ability to perform spatial transformations on a fixed-size 2D structure while maintaining data integrity across a transformation.
Coding & AlgorithmsOnsiteArraysMatrixStrings - MicrosoftMediumSoftware EngineerSimulate a Throttled Function Wrapper That Keeps Only the Latest Pending Call
A coding simulation of a throttle wrapper: given a cooldown length and sorted call times, report which calls actually run and when, where calls arriving during a cooldown keep only the latest one pending. It tests precise event ordering, an explicit rule for calls at the exact moment a cooldown ends, and an efficient single pass.
Coding & AlgorithmsOnsite - MicrosoftEasySoftware EngineerSizes of 4-Connected Foreground Regions in a Binary Image, in Scan Order
Given a binary image stored as a matrix of 0s and 1s, return the size of every region of horizontally or vertically connected foreground pixels, ordered by when each region is first reached in a top-to-bottom, left-to-right scan. It tests grid traversal, connected components, and handling a single region that covers up to a million pixels.
Coding & AlgorithmsOnsite - MicrosoftMediumSoftware EngineerSolve Three Coding Interview Problems
This problem tests your ability to manipulate sorted data, optimize for mathematical properties, and implement efficient data structures for string prefix operations.
Coding & AlgorithmsTechnical ScreenArraysMathTrie - MicrosoftHardSoftware EngineerSolve Throughput, Rate Limiting, and LFU
This problem tests your ability to design a system with O(1) time complexity for cache operations and time-window-based request tracking.
Coding & AlgorithmsOnsiteData StructuresHashingSliding Window - MicrosoftMediumSoftware EngineerSolve binary-search knapsack & graph shortest path
This question evaluates a candidate's ability to apply algorithmic optimization by using binary search instead of dynamic programming for a knapsack-style selection problem and to construct and compute shortest paths on a weighted graph from custom input.
Coding & AlgorithmsOnline Assessment - MicrosoftEasySoftware EngineerSolve binary-tree reverse printing and LPS
This question evaluates proficiency with tree data structures and level-order traversal semantics for reverse level printing, as well as string algorithmic reasoning and dynamic programming concepts for computing the longest palindromic subsequence, categorized under Coding & Algorithms.
Coding & AlgorithmsTechnical Screen - MicrosoftMediumSoftware EngineerSolve budget queries and shortest path
This question evaluates algorithmic design and data-structure selection for efficient preprocessing and query answering, along with shortest-path computation and graph representation choices, testing complexity analysis, large-input handling, path reconstruction, and edge-case reasoning in the Coding & Algorithms domain.
Coding & AlgorithmsOnline Assessment - MicrosoftHardSoftware EngineerSolve cache, grid path, and substring problems
This problem tests your ability to implement an LRU cache, solve a dynamic programming problem on a grid with constraints, and optimize string searching using the sliding window technique.
Coding & AlgorithmsOnsiteHash MapLinked ListDynamic Programming - MicrosoftEasySoftware EngineerSolve four classic algorithm problems
This set evaluates proficiency in core algorithms and data structures: tree traversal and order manipulation (zigzag level-order), dynamic programming and subsequence reasoning (longest palindromic subsequence), numeric algorithms and search/approximation (integer square root), and positional numeral systems/base conversion (spreadsheet column to number). These problems are commonly asked to assess algorithmic thinking, complexity analysis, and handling of edge cases in the Coding & Algorithms domain, testing both conceptual understanding of underlying principles and practical application of implementation techniques.
Coding & AlgorithmsTechnical Screen - MicrosoftMediumSoftware EngineerSolve load balancing and perfect pairs
This question evaluates algorithm design, correctness proof, and complexity analysis skills by combining a contiguous partitioning load‑balancing optimization with a combinatorial/number‑theoretic pair‑counting problem.
Coding & AlgorithmsOnline Assessment - MicrosoftHardSoftware EngineerSolve power jumps and graph tour
This problem tests your ability to optimize minimal operations using bitwise properties and to determine the existence of a specific graph traversal path.
Coding & AlgorithmsTechnical ScreenGreedyBitmask DPGraph Theory - MicrosoftMediumSoftware EngineerSolve three scheduling and array problems
This multi-part question evaluates algorithmic problem-solving skills across task scheduling with cooldowns, in-place array deduplication, and string rearrangement to avoid adjacent duplicates, highlighting concepts such as frequency counting, scheduling constraints, and two-pointer or in-place techniques within the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - MicrosoftMediumSoftware EngineerSort Three Categories In Place
This question evaluates proficiency in in-place array manipulation, constant-space algorithms, and linear-time partitioning techniques. Commonly asked in Coding & Algorithms interviews to assess algorithmic efficiency, pointer/index management, and reasoning about invariants, it focuses on practical application of algorithmic concepts rather than purely theoretical understanding.
Coding & AlgorithmsTechnical Screen - MicrosoftMediumSoftware EngineerStream output until stop token appears
This problem tests your ability to process streaming data from a generator while detecting a multi-character stop sequence that may be split across data chunks.
Coding & AlgorithmsTechnical ScreenStringsStreamingGenerators