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 3276 results

  • ByteDanceHardSoftware Engineer
    Simulate a fixed-capacity least-recently-used cache over get and put operations

    Implement a fixed-capacity cache that evicts the least recently used key, processing a sequence of get and put operations and returning the result of every get. Tests recency bookkeeping, update versus insert semantics, eviction order and constant-time operations.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceHardBackend Engineer
    Solve Bracket Matching and Tree Width

    This problem tests string manipulation and tree traversal techniques by requiring the validation of complex bracket sequences and the calculation of the maximum horizontal distance between nodes at the same level of a binary tree.

    Coding & AlgorithmsHR ScreenStacksBFSTrees
  • ByteDanceMediumSoftware Engineer
    Solve Search Speed and String Product

    This pair of problems evaluates algorithm design and implementation skills, focusing on efficient search/optimization for constrained processing speed and manual arbitrary-precision string multiplication for very large integers.

    Coding & AlgorithmsOnsite
  • ByteDanceMediumSite Reliability Engineer
    Solve Stack and String Shift Problems

    This problem tests your ability to handle nested validation using stacks and coordinate transformation using modular arithmetic on strings.

    Coding & AlgorithmsTechnical ScreenStackStringsModulo Arithmetic
  • ByteDanceMediumSoftware Engineer
    Solve interval merging and histogram area

    This question evaluates algorithmic problem-solving skills focused on interval manipulation and histogram-based area computation, emphasizing data structures, ordering, and reasoning about time and space complexity.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Sort Every Concentric Matrix Border Clockwise

    Sort the values on every concentric border of a rectangular matrix and write them back clockwise from each border's top-left cell. Traverse corners exactly once, preserve interior layer boundaries, handle single-row or single-column centers, and leave the input unchanged.

    Coding & AlgorithmsOnline Assessment
  • ByteDanceHardSoftware Engineer
    Split n People Into Two Groups So No Pair Who Dislike Each Other Shares a Group

    Given n people and a list of pairs who dislike each other, decide whether everyone can be divided into two groups of any size so that no disliking pair shares a group. The problem tests reasoning about pairwise constraints, people with no constraints, and a solution that runs in time linear in the number of people and pairs.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceEasySite Reliability Engineer
    Validate Matching Brackets

    Tests stack-based parsing fundamentals, early mismatch detection, and linear-time string validation for balanced bracket sequences.

    Coding & AlgorithmsTechnical Screenstackstringsparsing
  • C3 AIMediumData Scientist
    Decompress an encoded string

    Decompress an encoded 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 & AlgorithmsOnsite
  • C3 AIHardData Scientist
    Find longest substring with at least k repeats

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Find longest substring with at least k repeats states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • C3 AIHardData Scientist
    Find the Intersection of Two Linked Chains

    This problem tests the ability to detect the intersection point of two singly linked lists with constant space complexity, focusing on pointer manipulation and list traversal techniques.

    Coding & AlgorithmsOnsiteLinked ListsTwo PointersAlgorithms
  • C3 AIMediumData Scientist
    Longest Substring Where Every Character Appears at Least K Times

    Find the longest substring in which every present character appears at least k times. Practice divide-and-conquer splitting, frequency reasoning, and fixed-alphabet complexity.

    Coding & AlgorithmsTechnical Screen
  • C3 AIMediumSoftware Engineer
    Maximum-Sum Star with at Most K Arms

    Find the maximum node-value sum of a graph star with at most k arms, allowing a center alone and avoiding harmful negative-value leaves.

    Coding & AlgorithmsOnline Assessment
  • CadenceMediumMachine Learning Engineer
    Implement Depth-First Search Traversal

    This problem tests your ability to implement a recursive or iterative depth-first search (DFS) while managing state to handle cycles in a graph represented as an adjacency list.

    Coding & AlgorithmsTechnical ScreenGraphsDFSRecursion
  • Capital OneMediumSoftware Engineer
    Apply commands to transform a matrix

    This question evaluates array and matrix manipulation skills, specifically in-place row reversal, row swapping, and 90-degree rotation, and falls under the Coding & Algorithms domain with emphasis on practical implementation.

    Coding & AlgorithmsOnline Assessment
  • Capital OneMediumData Scientist
    Automate Python Virtual Environment Setup on Linux Terminal

    This question evaluates proficiency in shell scripting and Linux terminal automation for Python virtual-environment setup, focusing on environment management, automation, and reproducibility skills relevant to data science workflows.

    Coding & AlgorithmsOnsite
  • Capital OneMediumSoftware Engineer
    Block-Building Operations: Check Whether a Free Segment Starts at a Position

    Process operations on a number line that either place a block at a position or ask whether a segment of a given length starting at a position is free of blocks, and return the answers as a string of ones and zeros. It tests handling interleaved updates and range checks efficiently over large coordinates.

    Coding & AlgorithmsOnline Assessment
  • Capital OneMediumSoftware Engineer
    Build a Banking System with Activity Rankings

    This problem tests your ability to design a system that maintains account state and dynamically updates an ordered leaderboard of account activity using efficient data structures.

    Coding & AlgorithmsOnsiteHash MapBalanced BSTDesign
  • Capital OneMediumSoftware Engineer
    Check Alternating Highs and Lows Around a Circular Array

    Check strict high-low alternation around a circular array, including equal neighbors, wraparound comparisons, and the two-element case.

    Coding & AlgorithmsOnline Assessment
  • Capital OneHardMachine Learning Engineer
    Compute minutes since last train departure

    This problem tests your ability to manipulate time objects, handle cyclic day-wrap scenarios, and perform efficient searching on sorted lists.

    Coding & AlgorithmsOnline AssessmentArraysSortingTime Complexity
  • Capital OneMediumSoftware Engineer
    Count Numbers With Odd Zeros

    This question evaluates proficiency in numeric digit analysis and parity-based counting, testing the competency to reason about decimal representations of integers within the Coding & Algorithms domain at a practical application level. It is commonly asked to assess basic algorithmic thinking, efficient iteration and counting skills, and careful handling of edge cases in technical interviews.

    Coding & AlgorithmsTechnical Screen
  • Capital OneMediumSoftware Engineer
    Count Pairs of Cyclically Equivalent Integers

    This problem tests your ability to normalize strings under cyclic rotation using hashing or canonical representation, combined with frequency counting to efficiently identify equivalent pairs.

    Coding & AlgorithmsOnline AssessmentHashingStringsCombinatorics
  • Capital OneMediumSoftware Engineer
    Count Pairs of Points Within 2 Units on Both Axes

    A coding question that asks how many pairs of points intersect, where two points intersect when both their x-coordinates and their y-coordinates differ by at most 2. It tests counting unordered pairs with duplicate points, inclusive bounds and scaling to 100,000 points with large coordinates.

    Coding & AlgorithmsOnline Assessment
  • Capital OneHardSoftware Engineer
    Count Subarrays Containing at Least k Disjoint Pairs of Equal Values

    Count the contiguous segments of an integer array, framed as fruit types on a conveyor belt, that contain at least k pairs of equal values with no position used in two pairs. Tests reasoning about how the number of disjoint pairs changes as a segment grows, and efficient counting on inputs of up to 100,000 elements.

    Coding & AlgorithmsOnline Assessment
  • Capital OneMediumSoftware Engineer
    Count Subarrays Whose Step-by-Step Changes Match an Up, Flat, Down Pattern

    Count the fixed-length windows of an integer array whose consecutive rises, equal steps, and drops follow a given pattern of 1, 0, and -1 values, counting overlapping matches separately. Tests turning a comparison rule into an exact window check with correct index bounds.

    Coding & AlgorithmsOnline Assessment
  • Capital OneMediumSoftware Engineer
    Count Three-Digit Numbers With All-Distinct Digits in a Range

    A coding question that asks you to count the three-digit integers in an inclusive range whose hundreds, tens and units digits are all different from one another. It tests digit extraction, inclusive range boundaries and treating zero digits like any other digit.

    Coding & AlgorithmsOnline Assessment
  • Capital OneMediumSoftware Engineer
    Count Windows That Follow an Increase, Equal, Decrease Pattern

    A coding question that gives an integer array and a pattern of 1, 0 and -1 values standing for an increase, an equal step and a decrease, and asks how many windows of consecutive elements follow the pattern exactly. It tests translating pairwise comparisons into steps and counting overlapping matches efficiently.

    Coding & AlgorithmsOnline Assessment
  • Capital OneMediumSoftware Engineer
    Count ordered pairs that concatenate to target

    This question evaluates a candidate's ability to manipulate string and numeric representations, perform efficient counting, and leverage associative data structures to identify matching concatenations.

    Coding & AlgorithmsOnline Assessment
  • Capital OneMediumData Scientist
    Critique and Test Python Preprocessing Utilities Effectively

    This question evaluates a candidate's ability to review and critique Python preprocessing utilities, covering competencies in software design patterns (fit/transform separation), coding style and import hygiene, and unit-test specification for data-science pipelines.

    Coding & AlgorithmsTechnical Screen
  • Capital OneMediumData Scientist
    Debug and test a Python function in venv

    This question evaluates understanding of Python runtime semantics (mutable default arguments, in-place list mutation during iteration), debugging and unit-testing practices, virtual environment and packaging workflows, and CI/tooling considerations.

    Coding & AlgorithmsOnsite