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 631–660 of 3276 results
- ByteDanceMediumSoftware EngineerFind 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 EngineerFind 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 EngineerFind 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 - ByteDanceMediumSite Reliability EngineerGenerate 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 EngineerImplement 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 EngineerImplement 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 - ByteDanceMediumSite Reliability EngineerImplement 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 EngineerImplement 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 - ByteDanceEasyData ScientistImplement several OA simulation problems
This set of problems evaluates skills in string processing, memory simulation and allocation logic, and online data-structure maintenance for dynamic contiguous segment counting, testing algorithmic design and attention to stateful invariants.
Coding & AlgorithmsOnline Assessment - ByteDanceHardData ScientistImplement stack variants and upward path sum
A four-part ByteDance Data Scientist onsite coding question: implement an O(1) MinStack, a MaxStack with peekMax/popMax, a streaming median finder, and a binary-tree upward (node-to-ancestor) path-sum check. It tests data-structure augmentation, streaming order statistics, and prefix-sum tree reasoning.
Coding & AlgorithmsOnsite - ByteDanceMediumSoftware EngineerInfer 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 EngineerIntersect 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 EngineerLeast 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 - ByteDanceMediumMachine Learning EngineerMaximize 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 EngineerMaximize 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 EngineerMerge 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 EngineerMerge 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 EngineerMerge 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 - ByteDanceMediumSoftware EngineerMinimize 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 EngineerMinimum 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 - ByteDanceMediumSoftware EngineerOrder Named Tasks by Dependencies, Choosing the Alphabetically Smallest Order
Given named tasks and before-and-after dependency pairs, return an order that satisfies every dependency, choosing the alphabetically smallest valid order, or an empty list when the dependencies contain a cycle. It tests topological sorting, cycle detection and deterministic tie-breaking.
Coding & AlgorithmsOnsite - ByteDanceHardSite Reliability EngineerPlace 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 ScientistProbability 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 EngineerRemove 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 - ByteDanceMediumSoftware EngineerReport the winner after each move on an n-by-n tic-tac-toe board
Coding problem: replay an n-by-n tic-tac-toe game from a list of moves and report after every move whether the player who just moved has filled a row, a column or either diagonal. It tests efficient win detection on large boards and careful handling of diagonal and anti-diagonal cells.
Coding & AlgorithmsOnsite - ByteDanceEasySoftware EngineerReturn 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 EngineerReverse 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 EngineerReverse 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 - ByteDanceMediumSoftware EngineerRunning Median After Each Number in a Data Stream
Numbers arrive one at a time from a stream; after each arrival, return the median of everything received so far, averaging the two middle values when the count is even. The problem tests keeping order statistics up to date efficiently as a data stream grows.
Coding & AlgorithmsOnsite - ByteDanceMediumSoftware EngineerShortest Path in a Grid with Limited Obstacle Removal
This problem tests your ability to adapt Breadth-First Search (BFS) to a state-space graph where the state includes both spatial coordinates and a remaining resource constraint.
Coding & AlgorithmsTechnical ScreenBFSShortest PathState Space Search