Coding & Algorithms Interview Questions

Practice 3,469 real Coding & Algorithms interview questions for 2026. Covers companies like Meta, Amazon, Google, Uber, and Microsoft. Real questions from actual interviews with detailed solutions — ideal for focused interview preparation. Coding & Algorithms interview questions are the single most common technical gate for software engineering roles and are used to evaluate problem framing, algorithm selection, complexity trade-offs, correctness, edge-case reasoning, and clear communication under time pressure. Expect this category to appear in early technical screens and repeatedly across onsite loops at companies that weight it heavily (notably Meta, Google, and Amazon). Interviews will test arrays and strings, trees and graphs, dynamic programming, hashing and two‑pointer techniques, and the candidate’s ability to test and optimize code in a shared editor. Prepare with timed mock interviews, practice in the same editor you’ll use live, and build a progressive schedule that moves from fundamentals to medium/hard problems; typical candidates invest several weeks to a few months of focused practice depending on seniority and target company.

3.5k Questions 368 Companies08.11.2026
Showing 20 results
Role
Bytedance logo
Bytedance
Easy
Data Scientist

Implement several OA simulation problems

Reconstruct and solve the following coding problems from an online assessment. 1. Case-insensitive adjacent differences Given a string s, treat u...

Coding & Algorithms
2
0
41 people solved
Mar 5, 2026
OpenAI logo
OpenAI
Medium
Software Engineer

Implement a memory allocator with malloc/free

Problem You are implementing a simplified memory allocator over a contiguous memory region. Initialize the allocator with a fixed total size: - alloca...

Coding & Algorithms
19
0
201 people solved
Jan 9, 2026
Bytedance logo
Bytedance
Easy
Software Engineer

Add Two Signed Decimal Character Arrays

Add Two Signed Decimal Character Arrays Add two signed decimal integers supplied as strings without converting the complete inputs to built-in integer...

Coding & Algorithms
0
0
1 people solved
May 9, 2026
Airbnb logo
Airbnb
Hard
Software Engineer

Infection Spread Time on a Grid

Infection Spread Time on a Grid You are given an m x n grid where every cell holds one of three integer values: - 0 — an empty cell that can never be ...

Coding & Algorithms
0
0
7 people solved
Mar 4, 2026
Instacart logo
Instacart
Medium
Software Engineer

Decode an encoded string

Implement a decoder for an encoded string where repetition is expressed with a number followed by a bracketed substring. Rules: - A pattern k[substrin...

Coding & Algorithms
15
0
177 people solved
Mar 4, 2026
Uber logo
Uber
Hard
Software Engineer Locked

Solve Two OA Algorithm Problems

These problems evaluate algorithmic optimization and graph connectivity competencies, specifically cost-constrained integer resource allocation for th...

Coding & Algorithms
2
0
51 people solved
Jan 7, 2026
Netflix logo
Netflix
Easy
Machine Learning Engineer Locked

Implement rotating homepage title selector

This question evaluates understanding of data structures and algorithms for prioritized selection with stateful constraints, focusing on maintaining d...

Coding & Algorithms
2
0
43 people solved
Jan 6, 2026
xAI logo
xAI
Easy
Software Engineer

Implement an in-memory database with TTL and backup

In-Memory Database (Levels 1–4: TTL and Backup/Restore) Implement an in-memory database that stores records identified by a string key. Each record co...

Coding & Algorithms
107
2
1031 people solved
Jan 6, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Validate whether brackets are properly nested

This question evaluates proficiency in sequence validation, paired-token matching, and the use of data structures to manage nested elements within str...

Coding & Algorithms
13
0
100 people solved
Jan 6, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Rotate a 3×3 digit grid by 180°

This question evaluates understanding of grid and string manipulation, coordinate transformations, spatial reasoning, and character validation in cons...

Coding & Algorithms
10
0
115 people solved
Jan 6, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Validate CSV rows under multiple verification rules

This question evaluates skills in CSV parsing, string normalization and multi-rule data validation, covering whitespace handling, length checks, case-...

Coding & Algorithms
4
0
32 people solved
Jan 6, 2026
Meta logo
Meta
Medium
Software Engineer

Return Binary Tree Nodes in Vertical Order

Return Binary Tree Nodes in Vertical Order A binary tree has nodes numbered from 0 through n - 1, with node 0 as the root. Arrays left and right conta...

Coding & Algorithms
0
0
12 people solved
Mar 2, 2026
Cadence logo
Cadence
Medium
Machine Learning EngineerNew Grad Locked

Implement Depth-First Search Traversal

This question evaluates implementation and conceptual understanding of graph traversal algorithms, specifically depth-first search on adjacency-list r...

Coding & Algorithms
3
0
26 people solved
Jan 5, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Return right and left side views of a tree

This question evaluates understanding of binary tree data structures and the competency to identify side views by reasoning about which node is visibl...

Coding & Algorithms
4
0
39 people solved
Jan 5, 2026
Oracle logo
Oracle
Medium
Software Engineer Locked

Maximize area between vertical lines

This question evaluates algorithmic reasoning with arrays and the ability to optimize pairwise measurements, specifically assessing understanding of h...

Coding & Algorithms
3
0
48 people solved
Jan 4, 2026
Stripe logo
Stripe
Hard
Software EngineerSenior+ Locked

Implement Validation and String Compression

This question evaluates string processing, input validation, tokenization, hierarchical string manipulation, and algorithmic complexity analysis skill...

Coding & Algorithms
2
0
41 people solved
Mar 1, 2026
Walmart Labs logo
Walmart Labs
Medium
Software Engineer Locked

Count ways to make change (DP)

This question evaluates understanding of dynamic programming and combinatorial counting, focusing on unbounded coin usage and counting order‑independe...

Coding & Algorithms
6
0
71 people solved
Mar 1, 2026
Decagon logo
Decagon
Medium
Software Engineer

Compute exclusive CPU time from nested logs

You are given logs from a single-threaded CPU that runs n functions (IDs 0 to n-1). Each log entry is a string in the format: - "functionId:start:time...

Coding & Algorithms
12
0
205 people solved
Mar 1, 2026
Apple logo
Apple
Medium
Machine Learning Engineer Locked

Debug a PyTorch U-Net shape mismatch

This question evaluates proficiency in PyTorch model implementation, convolutional output shape arithmetic, channel configuration, and debugging of U-...

Coding & Algorithms
14
0
150 people solved
Mar 1, 2026
Pinterest logo
Pinterest
Hard
Machine Learning Engineer Locked

Sample a string by real-valued scores

This question evaluates probabilistic sampling, numerical stability, and algorithmic implementation skills for weighted selection under floating-point...

Coding & Algorithms
12
0
138 people solved
Mar 1, 2026

Frequently Asked Questions

How difficult are Coding & Algorithms interview questions?
Difficulty spans a wide range: from quick easy warm-ups to multi-stage hard problems that require advanced data structures or algorithmic proofs. Most companies place a majority of live coding rounds at the medium level, with occasional hard questions used to distinguish senior candidates. Interviewers evaluate problem framing, algorithm choice, time/space complexity, clean implementation, and thoughtful testing under time pressure. Expect more conceptual depth at Google, more consistent medium-to-hard screens at Meta, and Amazon to mix coding with leadership signals. Leveling depends on role and seniority: entry-level focuses on fundamentals; senior roles emphasize design, optimizations, and tradeoffs.
Where does Coding & Algorithms appear in a typical interview loop, and which companies weight it most heavily?
Coding & Algorithms is usually the first technical hurdle: it appears in phone/online screens, followed by one or more onsite or virtual coding rounds during the loop. Typical sequences are a technical screen, two to three in-loop coding sessions, then system design or behavioral rounds. Companies that weight this category heavily include Google, Meta, and Amazon, where coding performance often determines whether you progress. Candidates commonly concentrate practice for weeks or months beforehand; most targeting large tech firms prepare intensively for 6–12 weeks, while some spend 3–6 months for deeper mastery or level changes.
How long should I prepare and how should I structure that preparation?
Plan focused, progressive practice over a realistic timeline. A practical structure is an 8–12 week block: weeks 1–2 solidify fundamentals and language fluency; weeks 3–6 target core patterns (arrays, trees, graphs, DP) with timed problem sessions and pattern tagging; weeks 7–9 emphasize mock interviews, end-to-end problem solving, and optimization tradeoffs; final weeks simulate real loops with full-length sessions and targeted weak-point drills. Candidates with less experience may extend to 12–16 weeks. Regularly review mistakes, practice communicating solutions aloud, and include at least one weekly mock interview with peer or coach feedback.
What key subtopics and patterns should I master for Coding & Algorithms interviews?
Master a consistent set of patterns and their variations: arrays and strings (two pointers, sliding window), hash maps and frequency counts, sorting and binary search, recursion and backtracking, dynamic programming, trees and traversals, graphs (BFS/DFS, shortest paths, union-find), heaps and priority queues, and greedy algorithms. Also practice complexity analysis, space-time tradeoffs, and writing bug-resistant code with tests. For higher levels, focus on amortized analysis, advanced graph algorithms, segment trees or Fenwick trees, and system-aware optimizations. Interviewers value reusable problem templates and the ability to generalize patterns to new prompts.
What are standout tips and common pitfalls to avoid in Coding & Algorithms interviews?
Start by clarifying requirements and constraints, then outline your approach before coding. Write a correct, readable baseline solution first, then iterate to improve complexity while narrating tradeoffs. Test with simple and edge cases, and handle nulls, off-by-one, and empty inputs explicitly. Communicate continuously; silence looks like confusion. Avoid premature optimization, overcomplicating solutions, or ignoring interviewer hints. Time management matters: if stuck, discuss alternate approaches and code a partial solution. Finally, practice mock interviews to reduce anxiety and build the habit of clear, structured explanations under pressure.

Explore more Coding & Algorithms interview questions

Jump straight to Coding & Algorithms questions at a specific company or for a specific role.

By company
By role