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 601–630 of 3276 results

  • ByteDanceMediumSoftware Engineer
    Build a Removable Timestamp-Ordered Task Scheduler

    Design a task scheduler supporting task insertion/update, cancellation by ID, and retrieving ready tasks up to a given time limit using a min-heap with lazy deletion.

    Coding & AlgorithmsTechnical Screenheaphash-tabledesign
  • ByteDanceMediumSoftware Engineer
    Build a validated add-sub calculator

    This question evaluates skills in string parsing, tokenization, input validation, and safe integer arithmetic handling, with emphasis on enforcing format rules such as operator placement, prevention of leading zeros, and 32-bit signed integer bounds.

    Coding & AlgorithmsOnsite
  • ByteDanceHardSoftware Engineer
    Build the Largest Allowed Number Below a Limit

    This problem tests greedy algorithm design, string-based numeric comparison, and backtracking/recursive state management to construct the largest possible number under a given limit.

    Coding & AlgorithmsTechnical ScreenGreedyStringsRecursion
  • ByteDanceMediumSoftware Engineer
    Check Whether Every Course Can Be Completed Under Prerequisite Rules

    A graph feasibility problem: given n courses and pairs stating which course must be completed before another, decide whether every course can be finished. It tests modeling dependencies as a directed graph, recognizing circular requirements, and handling courses that fall into separate, disconnected groups.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Check Whether an n x n Tic-Tac-Toe Game Is Over (Win or Draw)

    Given an n x n tic-tac-toe board holding empty cells and two players' marks, decide whether the game is over because one player occupies an entire row, column or diagonal, or because the board is full with no winner. It tests complete line checks, draw detection and edge cases such as all-empty lines and a 1 x 1 board.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Clockwise Spiral Traversal of a Matrix With O(1) Extra Space and No Mutation

    From a TikTok backend intern interview: return the elements of an m x n matrix in clockwise spiral order using only constant extra space beyond the output, without a visited marker and without modifying the matrix. It tests careful traversal logic and off-by-one handling when a single row or column remains.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceHardMachine Learning Engineer
    Combined Median of Two Sorted Integer Lists in Logarithmic Time

    From a ByteDance technical screen for a machine learning engineer role: given two sorted integer arrays, return the median of all their elements combined, averaging the two middle values when the total count is even. It tests reasoning about sorted order under a logarithmic time target and edge cases such as an empty array.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumData Scientist
    Compute Minimum Parentheses Additions

    This question evaluates proficiency in string processing and algorithmic reasoning for balancing parentheses, testing understanding of invariants and edge-case handling.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Compute root-to-leaf number sum

    This problem tests your ability to perform depth-first search on a binary tree and maintain state (the current path sum) during the traversal to compute a cumulative total.

    Coding & AlgorithmsTechnical ScreenTreesDFSRecursion
  • ByteDanceMediumData Engineer
    Connect Points With Minimum Total Distance

    This problem tests your ability to model a geometric optimization task as a Minimum Spanning Tree (MST) problem and implement it efficiently using Kruskal's or Prim's algorithm.

    Coding & AlgorithmsOnsiteGraphsMSTGeometry
  • ByteDanceMediumSoftware Engineer
    Count House Segments After Sequential Demolitions

    Track the number of consecutive house segments after each requested demolition on an integer line. Each removal can eliminate an isolated segment, trim an endpoint, or split a run, so the solution must update the count efficiently across many distinct positions.

    Coding & AlgorithmsOnline Assessment
  • ByteDanceMediumSoftware Engineer
    Count Numbers with an Even Number of Digits

    Count how many positive integers in an array have an even number of decimal digits. Respect ordinary representations without leading zeroes, count repeated values independently, and handle boundaries such as 10 and 10000 correctly.

    Coding & AlgorithmsOnline Assessment
  • ByteDanceMediumData Scientist
    Count Same-Day Registered Posters

    This question evaluates SQL querying skills, including joining relational tables, date handling, aggregation, and deduplicating users across events. Commonly asked in Coding & Algorithms interviews for data scientists, it assesses practical relational database querying and analytics tasks—filtering, grouping, and counting distinct users across tables—and tests practical application of SQL rather than purely conceptual database theory; this summary is in English.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Count Similar Photo Groups

    This question evaluates understanding of graph connectivity and equivalence relations, requiring recognition of connected components from an adjacency-matrix representation of pairwise similarity.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceHardMachine Learning Engineer
    Count Special Subarrays by Modular Frequency

    This question evaluates the ability to apply modular arithmetic, frequency tracking, and prefix-count reasoning to efficiently count subarrays that satisfy a congruence condition, testing algorithmic problem-solving and scalable complexity management.

    Coding & AlgorithmsOnsite
  • ByteDanceHardSoftware Engineer
    Count Target-Sum Paths in an N-ary Tree

    This problem tests the ability to navigate tree structures and use hash maps to track cumulative path sums efficiently, specifically in the context of an N-ary tree.

    Coding & AlgorithmsTechnical ScreenTreesDFSPrefix Sum
  • ByteDanceHardSoftware Engineer
    Course Schedule Feasibility

    This problem tests the ability to detect cycles in a directed graph using topological sorting or Depth First Search, ensuring all task dependencies can be resolved.

    Coding & AlgorithmsOnsiteGraphTopological SortDFS
  • ByteDanceMediumSoftware Engineer
    Detect a Pythagorean Triple in an Integer Array

    This problem tests the ability to optimize a brute-force approach into an efficient search using sorting and the two-pointer technique to satisfy a geometric condition.

    Coding & AlgorithmsOnsiteArraysTwo PointersSorting
  • ByteDanceMediumData Scientist
    Determine Whether an Integer Is a Palindrome

    This problem tests your ability to manipulate integers mathematically to detect palindromic sequences without converting the number into a string, requiring careful handling of edge cases and integer overflow.

    Coding & AlgorithmsTechnical ScreenMathAlgorithmsInteger Manipulation
  • ByteDanceHardSite Reliability Engineer
    Determine whether squares can fit

    This question evaluates spatial reasoning, combinatorial packing, and constraint-satisfaction skills in the context of placing integer-aligned squares within an m x n rectangle.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Elements Occurring More Than n/3 Times in a Sorted Array

    This problem tests your ability to optimize frequency counting in a sorted array by leveraging binary search to achieve logarithmic time complexity, rather than a linear scan.

    Coding & AlgorithmsTechnical ScreenBinary SearchArraysSorting
  • ByteDanceMediumSoftware Engineer
    Enumerate All Simple Directed Cycles

    This problem tests graph traversal skills, specifically the ability to identify unique simple cycles in a directed graph using canonical representations to avoid duplicates.

    Coding & AlgorithmsTechnical ScreenGraphsDFSBacktracking
  • ByteDanceMediumSoftware Engineer
    Enumerate All Simple Directed Paths

    This problem tests graph traversal techniques, specifically depth-first search (DFS) with backtracking to identify all unique simple paths in a directed graph.

    Coding & AlgorithmsTechnical ScreenGraphDFSBacktracking
  • ByteDanceEasySoftware Engineer
    Equalize Root-to-Leaf Sums in an N-ary Tree

    Find the minimum total increments needed to make every root-to-leaf path in a nonnegative-valued N-ary tree have the same sum. The parent-array input may contain 200,000 nodes and a depth beyond Python's recursion limit.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Evaluate an Integer Arithmetic Expression with Parentheses

    This problem tests the ability to evaluate arithmetic expressions containing addition, subtraction, multiplication, and division, while correctly handling parentheses, operator precedence, and unary operators without using recursion.

    Coding & AlgorithmsTechnical ScreenStackMathParsing
  • ByteDanceMediumSoftware Engineer
    Find Maximum Candies With Two Types

    This question evaluates algorithmic problem-solving with arrays, focusing on managing constraints on the number of distinct element types in a contiguous sequence and maintaining element frequency/state during a traversal.

    Coding & AlgorithmsOnsite
  • ByteDanceEasySoftware Engineer
    Find Missing Ranges with Bounds

    This question evaluates understanding of sorted array manipulation, interval arithmetic, detection of maximal missing ranges, and careful handling of boundary and edge cases in integer intervals.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceHardSoftware Engineer
    Find Unique One-Use Combination Sums with Negative Values

    Tests backtracking and branch-and-bound optimization when searching for subsets that sum to a target with duplicate and negative values.

    Coding & AlgorithmsTechnical ScreenBacktrackingBranch and BoundArray
  • ByteDanceMediumSoftware Engineer
    Find Words in a Character Grid

    This question evaluates algorithm design for efficient multi-word search in a character grid, testing competencies in constrained graph traversal, managing large dictionaries, and selecting data structures for efficient lookup.

    Coding & AlgorithmsOnsite
  • ByteDanceHardSoftware Engineer
    Find the Best Word for a Query Suffix

    This problem tests your ability to efficiently query a dictionary for the longest word ending with a specific suffix, requiring optimal data structure usage for prefix/suffix operations.

    Coding & AlgorithmsTechnical ScreenTrieString ManipulationData Structures