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 1921–1950 of 3276 results
- MicrosoftMediumSoftware EngineerTraverse 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 - MicrosoftEasyData ScientistTraverse org chart level by level
This problem tests your ability to reconstruct a tree structure from a flat list of relationships and perform a breadth-first search (BFS) to group employees by their organizational depth.
Coding & AlgorithmsTechnical ScreenTreesBFSGraphs - MicrosoftHardSoftware EngineerValidate a Hierarchy and Compute Propagation Time
Tests graph validation and traversal by requiring candidates to verify whether directed relationships form a valid single-rooted directed tree and calculate the maximum propagation delay from the root.
Coding & AlgorithmsTechnical Screengraphtreedfs - MicrosoftEasyData ScientistWrite an average-income function
This problem tests your ability to clean and aggregate numerical data using Python, specifically handling missing values (None/NaN) and calculating a clean arithmetic mean.
Coding & AlgorithmsTechnical ScreenData CleaningPythonStatistics - Mistral AIHardSoftware EngineerCompute Remaining GPUs With Switching Limits
This question evaluates a candidate's ability to perform time-series aggregation, array manipulation, and constrained optimization for selecting resources across multiple clusters and days.
Coding & AlgorithmsTechnical Screen - MithrilMediumSoftware EngineerDetermine Safe Bomb Defusal
This problem tests your ability to model a system as a directed graph and determine the reachability of a 'safe' state while avoiding 'dead' states using graph traversal algorithms.
Coding & AlgorithmsOnsiteGraphBFSDFS - MithrilMediumSoftware EngineerParse code into operation triads IR
This question evaluates parsing and IR-generation skills, including tokenization, AST or three-address (operation triads) construction, deterministic control-flow serialization, and management of temporaries and labels.
Coding & AlgorithmsOnsite - MixpanelMediumSoftware EngineerGroup Events by an Ordered Attribute List
This problem tests recursive data structuring and hierarchical aggregation by mapping flat event logs to a nested tree of counts based on an ordered list of attributes.
Coding & AlgorithmsTechnical ScreenHash MapsRecursionData Aggregation - MixpanelMediumSoftware EngineerImplement precise string-based decimal addition
This question evaluates a candidate's proficiency in string-based arbitrary-precision arithmetic, including decimal alignment, fractional carry propagation, normalization of numeric strings, and analysis of time and space complexity.
Coding & AlgorithmsTechnical Screen - ModularHardSoftware EngineerFind the Critical Path
This question evaluates competency in graph algorithms and project scheduling, specifically reasoning about directed acyclic graphs, task dependencies, and accumulation of task durations to identify a critical path.
Coding & AlgorithmsTechnical Screen - MolocoMediumSoftware EngineerCan you visit all rooms and score parentheses?
The first problem evaluates graph traversal and reachability by modeling rooms and keys as an implicit graph, and it is commonly asked to assess reasoning about connectivity and exploration in graph-theoretic settings; this falls under the algorithms/graph theory domain and emphasizes practical application of traversal techniques.
Coding & AlgorithmsTechnical Screen - MolocoHardSoftware EngineerCompute subarray span for each element
This question evaluates array reasoning and competency in determining span-like influence regions under maximum-value constraints for each element, including handling circular-array extensions and scalability considerations.
Coding & AlgorithmsTechnical Screen - MolocoHardSoftware EngineerSupport Dynamic Range Sums
This question evaluates knowledge of data structures and algorithmic techniques for range queries and dynamic updates, along with complexity analysis for time and space.
Coding & AlgorithmsOnsite - MolocoadsMediumMachine Learning EngineerFind the Longest Consecutive Run of Ones
Implement an algorithm to find the maximum length of contiguous ones in a binary array without any bit flips, returning 0 for an empty input.
Coding & AlgorithmsOnsitearraystwo-pointerssliding-window - MongoDBMediumSoftware EngineerDesign iterator for sorted union
This problem tests your ability to design an iterator that merges multiple sorted streams of integers while performing on-the-fly deduplication using minimal extra memory.
Coding & AlgorithmsTechnical ScreenHeapIteratorsMerge Sort - MongoDBMediumSoftware EngineerImplement a thread-safe high-concurrency LRU cache
This problem tests your ability to design a thread-safe LRU cache using a combination of a hash map and a doubly linked list, requiring efficient synchronization to handle concurrent access.
Coding & AlgorithmsOnsiteConcurrencyLRU CacheHash Map - MongoDBMediumSoftware EngineerSuppress repeat log messages printed within 10 seconds of their last printed occurrence
Coding practice question: process a time-ordered stream of log messages and decide which ones are printed when the same text may print at most once every 10 seconds. It tests tracking state across a stream, exact boundary handling at the 10-second mark, and correctly ignoring suppressed events.
Coding & AlgorithmsOther - Moody'sMediumSoftware EngineerReturn Binary Search Tree Values in Ascending Order
This problem tests the ability to deserialize a level-order encoded Binary Search Tree into a tree structure and perform an in-order traversal to retrieve sorted values.
Coding & AlgorithmsOnsiteBinary TreeBSTDeserialization - Morgan StanleyMediumSoftware EngineerCompute minimal cost to merge numbers
Compute minimal cost to merge numbers evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsOnline Assessment - Morgan StanleyEasyData ScientistCompute win probability in coin-toss game
This question evaluates understanding of probability theory and stochastic processes, focusing on win probability in an alternating coin-toss game and reasoning about pattern occurrence and stopping times in random sequences.
Coding & AlgorithmsTechnical Screen - Morgan StanleyMediumSoftware EngineerCount decodings of a digit string
Count decodings of a digit string evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsOnline Assessment - Morgan StanleyMediumData ScientistImplement Factorial and Squares
A Morgan Stanley data scientist HR-screen live-coding warm-up: implement Python `factorial(n)` (iteratively, then explain the recursive version) and `squares(n)` returning the squares of the first n integers. Evaluates clean Python, the iteration-vs-recursion trade-off, time and space complexity analysis, input validation, and edge cases like n = 0 and negative input.
Coding & AlgorithmsHR Screen - MotiveMediumSoftware EngineerImplement Union-Find and track components
This question evaluates understanding and implementation of the Disjoint Set Union (Union-Find) data structure, covering union by rank, path compression, API design for union(a, b), connected(a, b), count(), and analysis of time and space complexity.
Coding & AlgorithmsOnsite - MotiveMediumSoftware EngineerImplement Union-Find for connectivity
This question evaluates understanding and implementation of the Disjoint Set Union (Union-Find) data structure—including path compression and union by rank—and competency in processing online connectivity queries on undirected graphs, categorized under Coding & Algorithms in the graph algorithms and data structures domain.
Coding & AlgorithmsOnsite - MoveworksMediumSoftware EngineerCompute Jaccard similarity between two strings
This question evaluates string tokenization, set-based similarity metrics (Jaccard index) and basic set operations, testing competency in text processing and algorithmic reasoning within the Coding & Algorithms domain and requiring practical application of these concepts.
Coding & AlgorithmsOnsite - MoveworksMediumSoftware EngineerFind a secret word via match feedback
This question evaluates algorithmic search, pattern-matching, and information-elimination skills in an interactive Mastermind-style word-guessing scenario, testing string comparison and combinatorial reasoning under constrained feedback.
Coding & AlgorithmsOnsite - NVIDIAEasySoftware EngineerCompute the Final Robot Score
Tests proficiency in using priority queues (heaps) to manage dynamic multisets under iterative reductions. Evaluates the ability to simulate priority-based selection and reason about time and space complexity.
Coding & AlgorithmsTechnical ScreenHeapPriority QueueSimulation - NVIDIAMediumSoftware EngineerConstruct tree from inorder & postorder
This question evaluates understanding of binary tree reconstruction and traversal order relationships, specifically the ability to derive tree structure from inorder and postorder arrays and implement the corresponding algorithm.
Coding & AlgorithmsTechnical Screen - NVIDIAMediumSoftware EngineerCount Server Pairs Relayed Through Each Node of a Weighted Tree
Given a weighted tree of servers and a signal speed, count for every server how many pairs of other servers it can relay: both path lengths must be multiples of the speed and the two paths must share no cable. Tests tree traversal, path-length reasoning and careful combinatorial counting.
Coding & AlgorithmsOther - NVIDIAHardSoftware EngineerCount Substrings with No Repeated Characters
Tests sliding window / two-pointer techniques to count all valid substrings without duplicate characters in linear time.
Coding & AlgorithmsTechnical Screensliding-windowtwo-pointersstrings