Katkat

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 661–690 of 1080 results

  • MicrosoftMediumSoftware Engineer
    Implement a rate limiter at scale

    This problem tests your ability to implement an efficient, thread-safe rate limiter using a sliding window algorithm to ensure a request quota is enforced across a distributed environment.

    Coding & AlgorithmsOnsiteConcurrencyData StructuresDistributed Systems
  • MicrosoftHardSoftware Engineer
    Implement a sliding-window rate limiter allow()

    This problem tests your ability to implement a thread-safe rate limiter using a sliding window algorithm to ensure a service stays within specified traffic constraints.

    Coding & AlgorithmsOnsiteConcurrencyRate LimitingHash Map
  • MicrosoftMediumMachine Learning Engineer
    Implement cache and merge intervals

    This question tests the ability to implement a fixed-capacity Least Recently Used (LRU) cache using hash maps and doubly-linked lists, followed by a classic interval processing algorithm to merge overlapping segments.

    Coding & AlgorithmsOnsiteLRU CacheIntervalsHash Map
  • MicrosoftMediumSoftware Engineer
    Implement four data-structure/string geometry tasks

    This problem tests foundational skills in string arithmetic, parsing, coordinate geometry, and segment tree-based range queries.

    Coding & AlgorithmsOnsiteStringsGeometryData Structures
  • MicrosoftHardSoftware Engineer
    Implement idempotent request handling with idempotency keys

    This problem tests your ability to design a thread-safe idempotency layer that ensures an API endpoint processes identical requests exactly once, even in the presence of concurrent execution.

    Coding & AlgorithmsOnsiteConcurrencySynchronizationSystem Design
  • MicrosoftHardData Scientist
    Implement lower_bound on unknown-size sorted array

    This question evaluates ability to design efficient search algorithms for unknown-length non-decreasing arrays accessed via a limited get(i) API, emphasizing correctness proof and tight query/time complexity bounds.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumData Scientist
    Implement rotated array binary search with duplicates

    This question evaluates algorithm design and analysis skills, focusing on binary-search variants, handling duplicates in rotated non-decreasing arrays, rotation-index reasoning, and rigorous edge-case analysis; domain: Coding & Algorithms, specifically search algorithms and array manipulation.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumSoftware Engineer
    Implement tree traversals, BFS, and subsets generation

    This question evaluates proficiency with fundamental data structures and algorithms—binary tree traversals (preorder, inorder, postorder), breadth-first search on unweighted graphs, and power-set/subset generation—emphasizing implementation choices between recursive and iterative approaches and required time and space complexity reasoning.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumApplied Scientist
    Insert Spaces to Rebuild a Sentence from Dictionary Words

    A coding question that asks you to insert spaces into a string that lost them so that every piece is a dictionary word, returning the smallest valid sentence or None when no split exists. It tests string segmentation with dictionary lookups, handling of impossible inputs, and a canonical tie-breaking rule.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumSoftware Engineer
    Keep Stable Unique Column Names Across Schema Changes

    Maintain stable case-insensitive unique column names across additions, removals, reordering, reappearance, and natural suffix collisions, with independent table histories.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumSoftware Engineer
    Longest Single-Letter Substring After at Most k Letter Replacements

    A string problem: given uppercase letters and a budget of k single-letter changes, find the longest contiguous substring that can be turned into one repeated letter. It tests efficient substring scanning with letter counts and careful reasoning about when a candidate substring stays valid.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumSoftware Engineer
    Maximize Equal Array Length After Contiguous Sum Merges

    Determine the maximum possible length of two identical arrays formed by repeatedly merging adjacent elements of two given positive-integer arrays, or return -1 if impossible.

    Coding & AlgorithmsOnsiteTwo PointersGreedyArrays
  • MicrosoftMediumSoftware Engineer
    Maximize profit with bounded sell window

    This question evaluates proficiency in array algorithms, time and space complexity analysis, and techniques for bounded-range optimization and streaming adaptation.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumApplied Scientist
    Maximum Subarray Sum of an Array Repeated K Times

    A coding question that first asks for the largest sum of a non-empty contiguous subarray, then for the same quantity when the array is written out k times back to back. It tests subarray reasoning across copy boundaries, all-negative inputs, and sums that overflow 32-bit integers.

    Coding & AlgorithmsOnsite
  • MicrosoftEasySoftware Engineer
    Measure Every Lake on a Map Tile, Listed in Scan Order

    Compute the area of every water body on a rectangular map tile, reported in the order a row-by-row scan first touches each one; tests connected components on a grid and avoiding recursion limits on huge regions.

    Coding & AlgorithmsOnsitegridgraph-traversaldfs
  • MicrosoftMediumSoftware Engineer
    Median of Every Fixed-Length Sliding Window in an Integer Array

    A coding problem that slides a window of fixed length k across an integer array and asks for the median of every window position, returned as floats in window order. It tests keeping the middle of a changing collection available as elements enter and leave, exact handling of even-sized windows, and overflow-safe averaging.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumSoftware Engineer
    Merge multiple sorted arrays using min-heap

    This question evaluates algorithm design and data structure proficiency, focusing on merging multiple sorted sequences and reasoning about time and space complexity for large numbers of arrays and elements.

    Coding & AlgorithmsOnsite
  • MicrosoftMediumSoftware Engineer
    Minimize Fuel Cost Across Cities

    Calculate the minimum monetary cost to travel between two cities in a road network where fuel is consumed per unit distance and can be stockpiled with unlimited capacity at local city prices.

    Coding & AlgorithmsOnsiteGraphDijkstraShortest Path
  • MicrosoftMediumSoftware Engineer
    Minimum 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 Engineer
    Minimum 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 Engineer
    Populate 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
  • MicrosoftMediumSoftware Engineer
    Recover 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
  • MicrosoftMediumSoftware Engineer
    Reverse 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 Engineer
    Rotate 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 Engineer
    Simulate 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 Engineer
    Sizes 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
  • MicrosoftHardSoftware Engineer
    Solve 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
  • MicrosoftHardSoftware Engineer
    Solve 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
  • MicrosoftMediumSoftware Engineer
    Solve 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 Engineer
    Traverse a Matrix in Clockwise Spiral Order

    Traverse a rectangular matrix in clockwise spiral order without modifying the input. Learn the four-boundary technique and the guards that prevent duplicate visits on the final row or column.

    Coding & AlgorithmsOnsite