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 331–360 of 1706 results

  • 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
  • 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
  • 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
  • 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
  • ByteDanceMediumSite Reliability Engineer
    Generate combinations and permutations

    This problem tests your ability to implement recursive backtracking algorithms to generate all possible permutations and combinations of a given set of distinct integers.

    Coding & AlgorithmsTechnical ScreenRecursionBacktrackingCombinatorics
  • 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
  • ByteDanceMediumSite Reliability Engineer
    Implement Sorted Search and Array Updates

    This question evaluates proficiency in array manipulation and fundamental algorithmic techniques—specifically binary search for sorted arrays, digit-wise arithmetic with carry handling, and in-place stable reordering—within the Coding & Algorithms domain and with attention to time and space complexity.

    Coding & AlgorithmsTechnical Screen
  • 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
  • ByteDanceMediumMachine Learning Engineer
    Maximize total catch over K hours from ponds whose yield drops after each hour

    Given the current hourly catch of each fishing pond and a budget of K hours, where every hour fished at a pond lowers its catch by one, compute the maximum total number of fish. It tests modeling the declining yields, choosing an optimal schedule, and meeting a time bound better than O(K log N) when K is very large.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceHardData Engineer
    Maximize watch time under adjacency constraint

    This Coding & Algorithms question for a Data Engineer role evaluates dynamic programming and sequence-optimization skills by requiring selection of a subsequence under a pairwise adjacency constraint on video durations, at a moderate-to-advanced algorithmic abstraction level.

    Coding & AlgorithmsTechnical Screen
  • 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
    Minimize Increments to Equalize Path Costs

    This problem tests your ability to manipulate tree node values to satisfy a global constraint using a bottom-up dynamic programming or greedy approach.

    Coding & AlgorithmsTechnical ScreenTreesGreedyRecursion
  • ByteDanceHardMachine Learning Engineer
    Minimum Number of Rooms to Host a Set of Possibly Overlapping Meetings

    Given meetings as half-open start and end time intervals, compute the minimum number of rooms needed so that no room ever hosts two overlapping meetings. Tests interval reasoning, correct handling of back-to-back meetings that share an endpoint, and an efficient approach for up to 100,000 meetings.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceHardSite Reliability Engineer
    Place Non-Attacking Queens

    This question evaluates a candidate's competency in combinatorial search, constraint reasoning, and algorithmic design for arranging non-attacking pieces on a grid.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumData Scientist
    Probability That One Fair Die Beats Another

    Solve a coding interview problem about the probability that one fair die beats another when the dice may have different sizes and duplicate face values. The challenge emphasizes strict tie handling and an efficient approach that avoids comparing every possible pair of faces.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Remove Duplicate Letters Lexicographically

    This problem tests your ability to use a monotonic stack combined with frequency tracking to construct a specific subsequence while maintaining lexicographical order.

    Coding & AlgorithmsTechnical ScreenStackStringGreedy
  • ByteDanceEasySoftware Engineer
    Return the Most Frequent Integer with a Stable Tie-Breaker

    Implement a frequency-based selection over a large integer array: return the most common value, using the numerically smallest value to break ties. Preserve the input and return the value itself rather than its count or position.

    Coding & AlgorithmsTechnical Screen
  • ByteDanceMediumSoftware Engineer
    Reverse Nodes in K-Sized Groups

    This problem tests your ability to manipulate linked list pointers by reversing sub-segments of a list while maintaining structural integrity.

    Coding & AlgorithmsTechnical ScreenLinked ListPointersRecursion
  • ByteDanceMediumMachine Learning Engineer
    Reverse a Linked List in Groups of K

    This problem tests your ability to manipulate pointers in a linked list structure and manage iterative or recursive state transitions for fixed-size segments.

    Coding & AlgorithmsTechnical ScreenLinked ListPointersAlgorithms