Katkat

practice a little every day, paws crossed ♡

Software Engineer 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 511–540 of 2629 results

  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • ByteDanceMediumSoftware Engineer
    Find the Earliest Contiguous Removal That Balances Index Sums

    This problem tests array manipulation, prefix sums, and index tracking while handling state changes caused by subarray removal.

    Coding & AlgorithmsTechnical ScreenArrayPrefix SumOptimization
  • ByteDanceMediumSoftware Engineer
    Find the Minimum Window Containing a Multiset of Characters

    This problem tests your ability to use the two-pointer sliding window technique combined with a frequency map to identify the smallest valid substring efficiently.

    Coding & AlgorithmsOnsiteSliding WindowHash MapStrings
  • ByteDanceMediumSoftware Engineer
    Find the N-th Highest Bid in an Auction Log Without a Heap

    Given an unordered list of auction bids, return the n-th highest one, treating two equal bid amounts as distinct entries, while a heap-based solution is off the table. Tests selection algorithms faster than full sorting, correct handling of duplicate values, and justifying the achieved time complexity.

    Coding & AlgorithmsOnsitequickselectarraysselection
  • ByteDanceHardSoftware Engineer
    Implement Expiring LRU Cache

    This question evaluates skill in designing and implementing efficient in-memory caching data structures, testing understanding of LRU eviction, per-entry TTL expiration, and the use of hash maps and linked lists for O(1) operations.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Implement Sliding Windows and LRU Cache

    This question evaluates algorithmic problem-solving and data-structure design, testing sliding-window and 2D submatrix reasoning for maximizing contiguous ones with bounded flips and the design of an LRU cache that enforces O(1) get/put semantics.

    Coding & AlgorithmsOnsite
  • ByteDanceMediumSoftware Engineer
    Implement an LRU Cache

    This problem tests your ability to combine a hash map and a doubly linked list to achieve constant-time performance for cache operations.

    Coding & AlgorithmsTechnical ScreenHash MapDoubly Linked ListDesign
  • ByteDanceMediumSoftware Engineer
    Infer an Alien Alphabet from Sorted Words

    This problem tests graph theory knowledge, specifically topological sorting using Kahn's algorithm or DFS, applied to dependency resolution between characters.

    Coding & AlgorithmsTechnical ScreenGraphTopological SortBFS
  • ByteDanceMediumSoftware Engineer
    Intersect Two Sorted Lists of Disjoint Intervals

    Intersect two sorted lists of disjoint closed intervals in linear time, retaining one-point endpoint overlaps and advancing whichever current interval ends first.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceHardSoftware Engineer
    Least Frequently Used (LFU) Cache

    This problem tests the ability to design an O(1) time complexity cache that evicts the least frequently used items, using recency as a tie-breaker.

    Coding & AlgorithmsOnsiteHash MapLinked ListData Structures
  • ByteDanceMediumSoftware Engineer
    Merge Overlapping Closed Intervals

    This problem tests your ability to manipulate sorted data structures and manage interval boundaries to optimize overlapping segments in linear or log-linear time.

    Coding & AlgorithmsTechnical ScreenSortingGreedyArray
  • ByteDanceMediumSoftware Engineer
    Merge Overlapping Time Windows

    Merge unsorted half-open time windows into sorted, non-overlapping intervals while leaving merely adjacent windows separate. Handle duplicate and nested ranges, large timestamps, large input, and empty collections under exact boundary semantics.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Merge overlapping closed intervals into a sorted list of disjoint intervals

    Coding problem: given closed integer intervals in any order, merge every group of overlapping or touching intervals and return the disjoint result sorted by start. It tests interval reasoning, correct handling of shared endpoints, duplicates and nested intervals, and a well-defined output order.

    Coding & AlgorithmsOnsite