ByteDance Coding Interview Questions
42 coding questions reported by candidates who interviewed at ByteDance, out of 52 ByteDance questions we track. They average 3.2/5 difficulty (medium). Most common topics: DFS, Array, Greedy, Hashmap. 26 were reported asked within the last year, most recently in July 2026.
Practice ByteDance questions →Difficulty
- 2/5 — easy3
- 3/5 — medium27
- 4/5 — hard12
Asked for SWE (39), MLE (19), Infra (5), RS (2)
Reported ByteDance coding questions
Number of Islands and Grid BFS Variants
3/5This frequently reported ByteDance interview question evaluates your ability to navigate two-dimensional matrices using graph traversal techniques. You will be tasked with identifying distinct clusters of connected elements within a grid, alongside common variations such as computing region sizes and calculating boundaries. This exercise tests your proficiency in implementing breadth-first and depth-first search algorithms efficiently under constraints. To explore the complete problem statement, optimal algorithmic approaches, and fully working code implementations, a subscription is required.
asked July 2026GridBFSDFSSRE Linux / Networking Troubleshooting Round
3/5This technical SRE evaluation, frequently reported at ByteDance, examines your foundational grasp of Linux operating system internals and computer networking through systematic troubleshooting scenarios. The oral round drills deep into diagnostic workflows for sudden storage exhaustion, degraded backend performance, and multi-layered web connectivity failures spanning DNS, TCP, and HTTP protocols. Candidates must demonstrate structured triage methodologies and rapid root-cause analysis. View the complete troubleshooting guide and expert response framework with a subscription.
asked July 2026SRENetworkingOperating SystemsGrid Shortest Path with K Obstacle Eliminations
3/5Navigate a constrained grid traversal challenge originating from ByteDance interviews that elevates classic pathfinding into a test of resource management. Starting at the corner of a matrix filled with passable terrain and barriers, you must find the shortest route to the destination while breaking through a limited number of obstacles. The puzzle examines your expertise in graph traversal algorithms like breadth-first search equipped with multi-dimensional state tracking. Discover the complete problem details and robust model implementation through a subscription.
asked June 2026GridBFSShortest PathElements Appearing More Than One Third in a Sorted Array
3/5Examine a classic frequency-finding puzzle frequently encountered in ByteDance technical interviews, where you must identify elements appearing more than a specified threshold within an ordered sequence. This exercise challenges your ability to optimize beyond standard linear scans by leveraging inherent structural properties to locate qualifying candidates efficiently. You will explore advanced search techniques to achieve logarithmic performance bounds for specific subsets of the input. Access the complete problem description, editorial guidance, and optimal code implementation with a subscription.
asked June 2026ArrayBinary SearchCountingReverse Nodes in k-Group (Incomplete Tail)
4/5Featured in ByteDance coding interviews, this problem requires you to reverse nodes in a linked list in fixed-size groups while leaving any remaining trailing nodes in their original order. The challenge specifically tests pointer manipulation skills, as you must relink nodes in-place without altering their underlying values. Reviewing the complete problem statement, pointer management strategies, and optimal model solution requires an active subscription.
asked June 2026Linked ListTwo PointerRecursionRemove Duplicate Letters for Lexicographically Smallest Result
3/5Presented during ByteDance interviews, this string manipulation task challenges you to eliminate duplicate characters while preserving a specific alphabetical ordering rule for the final output. It evaluates your ability to combine greedy decision-making with frequency tracking and stack structures to construct the optimal sequence efficiently. Successfully solving this requires a deep understanding of character precedence and stack invariants. Access the full problem description and verified solution with a paid subscription.
asked June 2026StringStackMonotonic StackLongest Zigzag Path in a Grid
3/5In this engaging graph exploration task reported during ByteDance interviews, you must locate the longest alternating sequence moving through a matrix of numerical values. The challenge tests your depth-first search or dynamic programming capabilities under strict directional change rules, ensuring no cell is visited twice while values bounce up and down. It assesses your capacity to navigate complex grid topologies with conditional transition states. The full problem and model solution require a subscription.
asked June 2026GridDFSBacktrackingLRU Cache (with TTL and LFU Follow-ups)
3/5Reported as a technical interview task at ByteDance, this problem asks you to build an efficient bounded cache that supports rapid key-value lookups and constant-time eviction of least recently used items. Beyond the standard operations, the prompt explores important production extensions such as time-to-live expiration and frequency-based replacement strategies. It is an excellent exercise for mastering low-latency data structures and memory management constraints. The comprehensive explanation and verified model solution are available exclusively to subscribers.
asked June 2026Data StructureHashmapLinked ListCourse Schedule and Topological Sort on a Directed Graph
3/5Graph theory and dependency resolution are core competencies evaluated during engineering interviews at industry giants like ByteDance. This interview question requires you to analyze a directed network to identify cyclic dependencies and establish a valid sequential workflow order. It tests your mastery of traversal strategies, cycle detection algorithms, and in-degree tracking techniques. Review the full problem guidelines and optimal algorithmic solution by obtaining a subscription.
asked June 2026GraphBFSDFSRAG / Agent / Kafka Oral Drill
3/5This oral technical screen, reported from ByteDance, evaluates your architectural expertise across distributed systems, modern AI frameworks, and backend persistence layers. The discussion covers retrieval-augmented generation design, agent orchestration workflows, tool utilization patterns, stream processing, and concurrency management. It is designed to test your ability to articulate complex system trade-offs and architectural choices under interview pressure. Gain access to detailed interview preparation notes and expert walkthroughs with a paid subscription.
asked June 2026RAGLLM AgentTool UseN-ary Tree Path Sum Count
3/5This ByteDance interview question challenges you to find the total quantity of top-down paths within a generalized hierarchical tree structure where node entries add up to a specific goal sum. Candidates must efficiently navigate arbitrary branching factors and handle negative values without relying on basic sliding window shortcuts. This problem tests your ability to adapt classic binary tree traversal patterns to multi-child nodes while maintaining optimal performance. Unlock the full problem description and expert model solution with a subscription.
asked May 2026TreeDFSPrefix SumWord Search II with Trie
4/5Master this popular ByteDance interview question focused on locating multiple dictionary terms inside a two-dimensional grid of letters. You will need to build an efficient prefix tree data structure and combine it with depth-first search traversal to explore adjacent matrix cells while avoiding duplicate finds. This problem evaluates advanced string matching, backtracking optimization, and spatial awareness. Unlock the full challenge details and professional code solution by getting a subscription.
asked May 2026TrieGridDFSHand-Code Self-Attention and Cross-Entropy
4/5Conquer a rigorous machine learning coding challenge frequently seen in ByteDance interview processes by implementing core deep learning components from scratch. You will be tasked with writing scaled dot-product attention in NumPy and deriving the binary cross-entropy loss function mathematically, alongside oral questions on architectural layers. This exercise examines your mathematical rigor and ability to translate theoretical formulations into stable vector operations. Access the comprehensive problem breakdown and ideal reference implementation with a subscription.
asked May 2026TransformerAttentionNumPyBasic Calculator (with and without Parentheses)
4/5This ByteDance interview question requires you to build a robust calculator capable of evaluating complex mathematical expressions provided as strings. The calculator must correctly handle non-negative integers, standard binary operators (addition, subtraction, multiplication, division), spaces, and parentheses. Key challenges include accurately implementing operator precedence rules, managing integer division with truncation towards zero, and correctly processing unary minus operations. This problem is a classic test of parsing techniques, stack-based algorithms, and careful state management to correctly interpret and compute the expression. The full problem and model solution require a subscription.
asked April 2026StackParsingString ProcessingMinimum-Cost Path on a Grid with Fuel and Recharge Cells
4/5Reported from ByteDance interviews, this advanced pathfinding challenge introduces resource management constraints to a standard grid traversal problem. Navigating from the start to the target incurs varying traversal costs while depleting a limited resource pool, which can only be replenished at designated recharge checkpoints and impassable obstacles must be avoided. The goal is to compute the most economical route under strict capacity limits. Review the complete problem statement, state-space modeling strategies, and optimal solution by upgrading to a paid subscription.
asked April 2026BFSDijkstraDynamic ProgrammingLongest Substring with At Most K Distinct Characters
2/5Master a popular sliding window algorithm featured in coding assessments at ByteDance, focused on finding the longest contiguous segment containing a limited variety of unique elements. This question evaluates your proficiency in maintaining dynamic frequency maps and efficiently adjusting boundaries to meet specific criteria. You will learn how to optimize time complexity by avoiding redundant scans while processing linear data structures smoothly. Perfect your ability to handle frequency tracking edge cases and pointer adjustments with confidence. Gain full access to the complete problem walkthrough and professional implementation by purchasing a subscription.
asked April 2026Sliding WindowHashmapStringCodeSignal SWE OA (Spring 2026 Bank)
4/5This ByteDance technical assessment featured on CodeSignal challenges candidates with a diverse set of algorithmic tasks ranging from memory management simulation to subarray parity counting. You will navigate through multiple distinct problems testing your data structure manipulation, interval logic, and procedural coding speed under time pressure. Reviewing these multi-part screening problems helps refine your ability to tackle diverse software engineering assessment formats. Unlock the complete problem set and verified solutions with a subscription.
asked March 2026SimulationSliding WindowGreedyReverse Words in a String (Preserve Spaces, In-Place)
3/5Challenge your string manipulation abilities with this classic algorithmic problem reported during coding rounds at ByteDance. The exercise requires you to reorder words within text efficiently while handling irregular whitespace, preserving specific formatting rules, and ultimately optimizing your memory footprint to operate directly within constant extra space. It tests your mastery of pointer manipulation and in-place transformation techniques commonly expected in top-tier technical screens. Reviewing the complete problem breakdown, optimal code, and alternative approaches requires a subscription.
asked March 2026StringTwo PointerIn Memory DatabasePhoto Groups via Transitive Similarity
3/5This ByteDance interview question challenges engineers to partition a collection of visual items into distinct clusters based on transitive relational data. The exercise examines graph traversal techniques and disjoint-set data structures to efficiently compute connected components within a relationship matrix. Success depends on recognizing how equivalence relations translate into graph connectivity problems. To view the full problem statement along with the complete optimal implementation, a subscription is required.
asked March 2026GraphUnion FindDFSBinary Tree Right Side View
3/5This tree traversal exercise, often highlighted in software engineering interviews at ByteDance, requires you to extract the outermost visible nodes of a hierarchical structure from a lateral perspective. The task evaluates your mastery of tree traversal techniques, such as breadth-first search and depth-first search, while managing custom data structures and manual test case setup. Access the complete problem description, complexity analysis, and clean code solutions with a subscription.
asked February 2026TreeBFSDFSValid Parentheses with Wildcard '*' and DFS All Strings
3/5Reported as a common interview challenge at ByteDance, this problem explores string validation and combinatorial generation with wildcard characters that can represent multiple grouping symbols or empty spaces. The initial task requires verifying overall structural correctness in linear time, while the follow-up asks you to enumerate every unique valid permutation using depth-first search techniques. It effectively tests your command over state tracking, backtracking, and duplicate elimination. Gain access to the full problem description, algorithmic breakdown, and reference code with a subscription.
asked January 2026StringStackDFSMinStack, MaxStack and Streaming Median
4/5Mastering advanced linear data structures is a common hurdle in technical evaluations, exemplified by this reported ByteDance interview challenge. Candidates are tasked with implementing specialized container collections capable of tracking running extremes in constant time alongside managing a continuous data stream for real-time statistical computations. This exercise rigorously examines your ability to combine foundational push-and-pop mechanisms with dual-heap architectures for optimal performance under tight constraints. Access to the complete problem breakdown and the optimal reference solution requires a subscription.
asked January 2026StackHeapData StructureLargest Rectangle in Histogram
4/5This classic algorithmic challenge, frequently asked in ByteDance interviews, requires you to efficiently compute the maximum rectangular area that can be formed within a histogram given an array of bar heights. The assessment evaluates your mastery of linear-time monotonic stack algorithms and your ability to optimize spatial geometry computations. To view the complete problem breakdown and optimal model implementation, a subscription is required.
asked January 2026StackArrayComplexity AnalysisBinary Tree Maximum Path Sum (with path reconstruction)
4/5This advanced interview task, highlighted by ByteDance, extends the traditional tree traversal challenge by asking you to locate the highest-scoring traversal route and reconstruct the exact node sequence. Handling negative values and branching paths requires sophisticated recursive tracking and state management. The exercise tests your deep comprehension of tree-based dynamic programming and pointer manipulation. Access to the full problem details and a production-grade model solution requires an active subscription.
asked January 2026DFSDynamic ProgrammingRecursionCodeSignal ML / Research Scientist OA (10-Problem Battery)
4/5This rigorous ByteDance assessment battery for research scientist candidates evaluates both theoretical machine learning knowledge and practical algorithmic implementation. Spanning ten distinct challenges, the test covers classification metrics, decision tree criteria, manual neural network forward passes, and building clustering algorithms from scratch. It is designed to thoroughly examine your foundational understanding of statistical learning and robust coding skills. Unlock the complete question list and detailed solutions by securing a paid subscription.
asked January 2026ML KnowledgeClassificationLinear AlgebraContiguous Subarray with Largest Min + Max
3/5Encountered in technical assessments at ByteDance, this coding challenge requires finding a contiguous subarray of sufficient length that maximizes the sum of its minimum and maximum elements. The problem tests your ability to analyze numeric sequences and optimize sliding window or linear scan strategies efficiently. Developing an optimal solution demands strong analytical thinking to avoid brute-force bottlenecks. Unlock the full problem details, test cases, and model solution by subscribing today.
asked November 2025ArrayTwo PointerMathMin Cost to Connect All Points (Manhattan MST)
3/5Finding optimal network connections in a multi-dimensional space is a fundamental graph theory challenge, featured here as a reported ByteDance interview question. Applicants are asked to determine the absolute minimum expenditure required to link a scatter of coordinates using grid-based distances, effectively building a minimum spanning tree. This problem tests your expertise in advanced graph algorithms and efficient edge weighting strategies. Unlock the full challenge details and a robust algorithmic solution with your subscription.
GraphMstPrimReverse Linked List
2/5This ByteDance coding question checks core pointer manipulation on a singly linked structure. Candidates must flip the direction of every link without losing track of the remaining nodes, and handle empty and one-element inputs cleanly. It also invites a discussion of iterative versus recursive traversal and their memory trade-offs.
Linked ListPointersReverseNumber of Islands and Total Island Perimeter
3/5Analyze a grid-based spatial environment to simultaneously determine distinct regional clusters and calculate their aggregate boundary lengths. This classic graph traversal puzzle has been featured in technical interviews at ByteDance, testing your proficiency with matrix traversal techniques and spatial reasoning. You will develop robust algorithms to inspect connected components efficiently. Gaining access to the full problem context and model solution requires a subscription.
GridDFSBFSIn-Memory Key-Value Store with Snapshot and Restore
3/5Tackling this ByteDance coding challenge involves engineering an in-memory dictionary data structure equipped with robust serialization and restoration capabilities. The exercise tests your ability to handle standard data modifications alongside deterministic state persistence, ensuring identical internal conditions always yield matching export strings regardless of complex character sets or delimiters. Developers must carefully structure their code to support reliable rebuilding without data loss. Access to the comprehensive prompt details and the complete, production-ready solution requires a paid subscription.
DesignHashmapSerializationCount Number of Nice Subarrays
3/5Featured in recent ByteDance technical interviews, this array manipulation challenge tests your efficiency with continuous sequence analysis and prefix-sum counting techniques. You are tasked with identifying and quantifying specific contiguous segments within an integer collection that contain a precise quantity of odd numbers. The exercise evaluates your capability to optimize nested loops into linear-time sliding window or hash-based solutions. To access the complete problem statement, complexity analysis, and verified model solution, a subscription is required.
ArrayPrefix SumHashmapDesign Circular Queue
3/5Mastering queue mechanics is a fundamental skill frequently evaluated in technical screenings, such as this reported ByteDance interview question. The challenge focuses on constructing a fixed-capacity linear structure that wraps around efficiently to maximize storage utilization and handle standard FIFO operations. Candidates must carefully manage pointers and boundary conditions to ensure seamless insertion and deletion without memory waste. Testing your understanding of efficient array manipulation, this problem highlights optimal pointer tracking. Access to the comprehensive problem breakdown and verified model solution requires a subscription.
QueueDesignArrayMost Frequent Element with Smallest-Value Tie Break
2/5Reported as an interview task at ByteDance, this coding puzzle requires identifying the element that appears most frequently in a collection while correctly resolving ties by selecting the smaller numerical value. It evaluates your skill in leveraging hash maps, frequency counting, and custom sorting logic to process large datasets efficiently. Gain access to the full problem breakdown, complexity analysis, and complete model implementation with a subscription.
HashmapCountingArraySingle-Threaded CPU Task Scheduling with Priority Queue
3/5Reported from ByteDance technical rounds, this scheduling simulation problem requires you to manage a stream of incoming jobs with distinct arrival times and processing durations on a single-threaded processor. The challenge tests your ability to use priority queues and heap data structures to dynamically select the optimal available workload based on specific tie-breaking rules. You must efficiently advance time and track execution sequences under heavy constraints. Gain access to the full problem breakdown, performance optimizations, and tested model solution with a subscription.
HeapPriority QueueSimulationCount of Interesting Subarrays
3/5This ByteDance interview question challenges you to determine the number of segments in a sequence that meet specific remainder conditions based on given divisors and target values. The task evaluates your ability to apply prefix sums and frequency counting techniques to efficiently process array data and handle large numerical ranges. You can master the complete algorithmic strategy and view the fully verified model solution by unlocking our comprehensive subscription.
ArrayPrefix SumHashmapMeeting Rooms II (Minimum Rooms Required)
3/5Frequently featured in ByteDance technical screenings, this scheduling challenge requires you to compute the minimum quantity of spaces necessary to host overlapping events simultaneously without conflicts. By organizing time boundaries and tracking concurrent allocations, you will test your proficiency with interval processing and greedy optimization strategies. Mastering this scenario is essential for handling resource-allocation puzzles in distributed systems. The full problem and model solution require a subscription.
SortingHeapSweep LineMeeting Rooms III (Most Booked Room)
4/5This ByteDance interview question tests your resource scheduling and allocation logic using a priority-based meeting room assignment system. You must process scheduled time intervals sequentially, assigning venues according to availability rules, tie-breaking indices, and conflict delay mechanisms. The challenge assesses your ability to maintain sorted states efficiently while tracking usage frequency metrics. Access to the complete problem description and an optimal model solution requires a subscription.
HeapPriority QueueSortingMaximum Candies Allocated to K Children
3/5As featured in ByteDance coding assessments, this problem challenges you to distribute candy piles among a group of children to maximize an equal and fair share per recipient. You will need to utilize search optimization techniques over integer boundaries to determine the optimal allocation size efficiently. Unlock the complete challenge specification and optimized solution by subscribing.
ArrayBinary SearchBinary Search On AnswerMerge Intervals with Possibly Reversed Endpoints
3/5Tackle a popular coding assessment problem reported at ByteDance involving interval combination where raw segment endpoints might arrive out of order. Engineers must normalize boundary values and efficiently consolidate overlapping ranges into a clean, sorted sequence. This task tests your ability to handle messy incoming datasets and implement interval manipulation algorithms correctly. Reviewing the full problem specifications and optimal implementation requires an active subscription.
ArrayIntervalsSortingReverse Linked List in Groups of K Including the Last Partial Group
3/5This ByteDance coding challenge tests your ability to manipulate singly linked list pointers in-place by reversing nodes in fixed-size batches, including any leftover elements at the end. The task demands optimal time efficiency and constant auxiliary space without relying on auxiliary data structures. Unlock the complete problem walkthrough and verified model solution with a paid subscription.
Linked ListReversalTwo PointerLongest Common Suffix Queries
4/5This ByteDance coding problem involves processing a series of queries against a collection of words. For each query string, your task is to locate the word within the provided container that shares the longest possible common suffix. In cases where multiple words yield the same maximum suffix length, you must apply specific tie-breaking rules: prioritize the shorter string, and then the one with the smaller original index. This problem evaluates your proficiency with string matching and efficient data structures. The full problem and model solution require a subscription.
TrieStringSuffixReverse the Order of k-Groups in a Linked List
3/5Reported from a ByteDance interview, this challenge involves manipulating a singly linked list by partitioning it into fixed-size segments and reversing the sequence of those segments as whole units while keeping the internal node order intact. The task tests your pointer manipulation skills and ability to handle edge cases like incomplete trailing groups. Careful index tracking and modular list reversal logic are essential for success. Unlock the full problem details and expert model solution with a subscription.
Linked ListArraySimulation
ByteDance coding interview FAQ
- What coding questions does ByteDance ask?
- 42 reported coding questions, most often on DFS, Array, Greedy, Hashmap, Grid.
- How hard is the ByteDance coding interview?
- The reported coding questions average 3.2 out of 5: 3 at 2/5, 27 at 3/5, 12 at 4/5.
- Are these ByteDance coding questions recent?
- The most recent report is from July 2026, and 26 were reported within the last twelve months. Dates come from the interview reports themselves.