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 751–780 of 3276 results
- CitadelMediumSoftware EngineerDesign a token manager with lazy expiration
This problem tests your ability to design a token management system that supports efficient retrieval, updates, and lazy removal of expired tokens using a combination of a hash map and a priority queue.
Coding & AlgorithmsTechnical ScreenHash MapHeapTTL - CitadelMediumSoftware EngineerDesign dynamic weighted random sampling with updates
This question evaluates a candidate's ability to design and analyze dynamic data structures that support weighted random sampling with inserts and deletes, testing skills in algorithm design, complexity analysis, and randomized sampling under large numeric constraints.
Coding & AlgorithmsOnsite - CitadelHardSoftware EngineerEvery MEX Reachable With At Most One Bounded Increment
A coding problem about memory blocks with values below n: using at most one increment of a single value, never raising a value to n, list every minimum excluded value (MEX) the array can end up with. It tests careful case analysis of how one increment can open or fill a gap, handling duplicate values, and returning the sorted answer efficiently.
Coding & AlgorithmsOnline Assessment - CitadelHardSoftware EngineerEvery Reachable Priority Gap After At Most One Bounded Bump
Given n network ports each tagged with a priority code below n, find every value the lowest unused priority code could take after at most one bounded increment. Tests careful case analysis of how a single bump opens or closes a gap, and returning the answer efficiently.
Coding & AlgorithmsOnline Assessmentarrayscountingmex - CitadelMediumSoftware EngineerFind earliest common meeting slot
This question evaluates proficiency with interval manipulation, timeline merging, and algorithmic reasoning for scheduling constraints, measuring competency in handling sorted interval lists, edge-case sanitization, and complexity analysis.
Coding & AlgorithmsTechnical Screen - CitadelMediumSoftware EngineerFind the Index Range of a Target in a Sorted Array
Implement an algorithm to find the first and last index of a target value in a sorted array in O(log n) time.
Coding & AlgorithmsTechnical Screenbinary-searcharrayscitadel - CitadelMediumSoftware EngineerFind the Shortest Target-Sum Path
This problem tests your ability to navigate binary trees using recursion or iterative traversal while maintaining state to find a path that meets a specific sum criteria with the smallest number of nodes.
Coding & AlgorithmsTechnical ScreenTreesDFSRecursion - CitadelHardSoftware EngineerFirst Free Locker Number After One Tag Bump
Given locker tags in [0, n-1], list every possible smallest missing tag after at most one capped +1 adjustment. Tests MEX reasoning, careful case analysis around duplicates, and an O(n) solution.
Coding & AlgorithmsOnline Assessmentarrayscountingcase-analysis - CitadelMediumSoftware EngineerGenerate Prefix-Based Product Suggestions
Generate up to three lexicographically smallest product suggestions for every prefix of a search word, with efficient handling once a prefix has no matches.
Coding & AlgorithmsOnsite - CitadelMediumData ScientistImplement Infinite Fibonacci Generator Using Lazy Evaluation
This question evaluates understanding of lazy evaluation and Python generator semantics, testing a candidate's ability to work with iterative sequence production and manage state across iterations.
Coding & AlgorithmsTechnical Screen - CitadelEasySoftware EngineerImplement LRU/LFU cache with custom eviction
This problem tests your ability to design a generic cache structure that supports interchangeable eviction strategies, requiring efficient lookup and metadata management.
Coding & AlgorithmsTechnical ScreenHash MapLinked ListCache - CitadelMediumData ScientistImplement Piecewise Linear Interpolation and Extrapolation
Implement piecewise linear interpolation from unsorted knots, including exact-knot behavior and endpoint extrapolation. Practice paired sorting, binary search, and numerical edge cases.
Coding & AlgorithmsTechnical Screen - CitadelMediumSoftware EngineerImplement a single-producer multi-consumer ring buffer
This question evaluates understanding of ring-buffer data structures, circular indexing, fixed-capacity storage, and object-oriented design for a single-producer, multi-consumer implementation in C++.
Coding & AlgorithmsTechnical Screen - CitadelEasySoftware EngineerImplement an in-memory order book API
This problem tests your ability to design an in-memory data structure for an order book using efficient data structures to support order management and price-level aggregation.
Coding & AlgorithmsTechnical ScreenData StructuresHash MapTree - CitadelMediumSoftware EngineerImplement array merge, round-robin scheduler, and trading simulator
This problem tests your ability to manipulate data structures efficiently, implement a fair process scheduler, and manage event-driven state transitions.
Coding & AlgorithmsOnsiteArraysQueuesHeaps - CitadelMediumData ScientistImplement lazy unique-merge generator for sorted streams
This question evaluates knowledge of lazy evaluation, Python generators/iterators, merging nondecreasing streams with duplicate elimination, and considerations of time and space complexity in streaming contexts.
Coding & AlgorithmsTechnical Screen - CitadelMediumSoftware EngineerImplement task queue with insert, delete, execute
This question evaluates a candidate's ability to design and implement efficient dynamic priority management, including priority ordering, insertion-order tie-breaking, and support for add, remove, and execute operations.
Coding & AlgorithmsOnsite - CitadelMediumData ScientistImplement two-pointer unique-pair sum search
Implement two-pointer unique-pair sum search 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 & AlgorithmsTechnical Screen - CitadelMediumData ScientistMatch a string with wildcard pattern recursively
This problem tests your ability to implement a recursive pattern-matching algorithm that handles specific wildcard characters while managing overlapping subproblems.
Coding & AlgorithmsTechnical ScreenRecursionDynamic ProgrammingString Matching - CitadelMediumSoftware EngineerMaximize Earnings by Adding Working Days
Maximize schedule earnings by changing at most k days off into working days, balancing fixed daily pay with bonuses for consecutive working days.
Coding & AlgorithmsTechnical Screen - CitadelMediumSoftware EngineerMaximize Earnings by Converting Days Off
Tests dynamic programming and state tracking to maximize daily earnings and consecutive work streak bonuses under a budget of schedule changes.
Coding & AlgorithmsHR Screendynamic-programmingalgorithmssliding-window - CitadelMediumSoftware EngineerMerge K Drone Telemetry Streams Into a Running Altitude Timeline
Interleave K drones' individually time-ordered altitude logs into a single replay and track the fleet's shared altitude total as each logged change is applied. Tests k-way merging with a heap, a deterministic tie-break across drones, and correct handling of negative deltas and drones with no events.
Coding & AlgorithmsTechnical Screenheapmerge-intervalsstreaming - CitadelMediumSoftware EngineerMerge K Timestamp-Sorted Price Feeds into a Running Absolute Price
Merge K price-event feeds, each already sorted by timestamp, into one chronological stream and return the running absolute price after every event, starting from zero. It tests merging sorted sequences efficiently, a deterministic tie-break for equal timestamps by feed index and then in-feed order, negative deltas, empty feeds, and 64-bit accumulation.
Coding & AlgorithmsTechnical Screen - CitadelMediumSoftware EngineerMerge K timestamped lists with timestamp coalescing
This problem tests your ability to efficiently merge multiple sorted streams of data and aggregate values associated with the same timestamp.
Coding & AlgorithmsTechnical ScreenHeapMerge SortData Streams - CitadelMediumSoftware EngineerMinimize Changes to Make Every Password Block Palindromic
Tests string manipulation and two-pointer techniques to determine the minimum character replacements needed to make independent fixed-length blocks palindromic.
Coding & AlgorithmsHR Screenstringstwo-pointersgreedy - CitadelMediumSoftware EngineerMinimize changes for k-periodic palindrome
This question evaluates understanding of string algorithms and combinatorial reasoning, focusing on palindrome properties combined with k-periodicity and the ability to minimize character changes under global constraints.
Coding & AlgorithmsOnline Assessment - CitadelMediumSoftware EngineerMinimize image processing cost with discount
This question evaluates a candidate's competence in algorithm design and optimization, including interval-based cost aggregation and modular arithmetic for large-number results within the Coding & Algorithms domain.
Coding & AlgorithmsOnline Assessment - CitadelMediumSoftware EngineerPerform an External Merge Sort with a Heap
Implement an external merge sort simulation that partitions a data stream into memory-bounded sorted runs and merges them using a min-heap.
Coding & AlgorithmsOnsiteExternal SortHeapStreaming - CitadelEasySoftware EngineerRead and Write Files with Shared Content
Design an in-memory file system that shares identical content payloads across multiple file paths to save memory, supporting reads, writes, and deduplication tracking.
Coding & AlgorithmsTechnical ScreenHash TableDesignString - CitadelMediumSoftware EngineerReturn a Valid Dependency Order for Named Tasks
Implement a deterministic topological sort for a directed acyclic graph of named tasks with cycle detection and lexicographical tie-breaking.
Coding & AlgorithmsTechnical ScreenGraphTopological SortHeap