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
SoFi logo
SoFi
Medium
Software Engineer Locked

Format words into wrapped/justified lines

This question evaluates practical programming skills in string processing, greedy packing, and careful handling of spacing and edge cases, and falls u...

Coding & Algorithms
20
1
214 people solved
Feb 12, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Compute time for virus to infect grid

This question evaluates a candidate's ability to reason about grid-based state propagation, algorithmic problem solving, and performance consideration...

Coding & Algorithms
23
0
180 people solved
Feb 12, 2026
Lead Bank logo
Lead Bank
Medium
Software Engineer

Implement a versioned hash map with snapshot

VersionedHashMap (time-travel key-value store) Design and implement a data structure VersionedHashMap<K, V> backed by a hash map that supports retriev...

Coding & Algorithms
7
0
103 people solved
Feb 12, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Answer two coding questions (SQL and DP)

This multi-part question evaluates SQL query skills (handling distinct values, aggregation and edge-case NULL results) and algorithmic proficiency in ...

Coding & Algorithms
26
0
222 people solved
Feb 12, 2026
TikTok logo
TikTok
Medium
Machine Learning Engineer

Maximize sum with no adjacent elements

Given an array of non-negative integers nums, choose a subset of elements such that no two chosen elements are adjacent in the original array. Return ...

Coding & Algorithms
8
0
79 people solved
Feb 12, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Find maximum collinear points

This question evaluates understanding of planar geometry and algorithmic reasoning for identifying collinearity, including handling duplicate points a...

Coding & Algorithms
6
0
101 people solved
Feb 12, 2026
Carvana logo
Carvana
Easy
Software Engineer

Spell Out a Nonnegative Integer

Given a nonnegative integer, return its English words representation. Implement a function that handles numbers from 0 through 2,147,483,647 inclusive...

Coding & Algorithms
0
0
10 people solved
Apr 26, 2026
MathWorks logo
MathWorks
Easy
Software EngineerIntern

How to maximize rewards with exactly k tasks

You are assigning n independent tasks to two interns. - Each task must be done by exactly one intern. - If intern 1 does task i, you earn reward1[i] p...

Coding & Algorithms
5
0
55 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Implement a sliding-window rate limiter allow()

This question evaluates understanding of sliding-window rate limiting, time-windowed counting, and per-user state management for high-throughput servi...

Coding & Algorithms
5
0
51 people solved
Feb 11, 2026
xAI logo
xAI
Medium
Software Engineer Locked

Compute total active time per Twitter Space

This question evaluates a candidate's ability to perform event-log sessionization and time-interval aggregation across users and spaces, testing skill...

Coding & Algorithms
18
0
131 people solved
Feb 11, 2026
Chalk logo
Chalk
Medium
Software Engineer Locked

Compute rainwater accumulation on a height grid

This question evaluates understanding of grid-based graph traversal, flow simulation to local minima, and the ability to reason about state propagatio...

Coding & Algorithms
23
0
371 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Solve cache, grid path, and substring problems

This multipart question evaluates algorithmic problem-solving and data structure design skills, covering a capacity-bounded cache with eviction behavi...

Coding & Algorithms
3
0
45 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Answer suffix maximum-frequency queries

This question evaluates algorithm design skills and array-processing competency for answering repeated queries efficiently, focusing on time and space...

Coding & Algorithms
5
0
99 people solved
Feb 11, 2026
Snapchat logo
Snapchat
Hard
Software Engineer Locked

Find minimum-latency path across dependent services

This question evaluates understanding of graph algorithms and shortest-path computation on weighted directed graphs, including handling cycles, multip...

Coding & Algorithms
4
0
51 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Medium
Machine Learning Engineer Locked

Detect stop tokens during streaming inference

This question evaluates streaming sequence-detection and pattern-matching skills, including online buffer management and correct handling of overlappi...

Coding & Algorithms
3
0
60 people solved
Feb 11, 2026
Applied logo
Applied
Medium
Software Engineer Locked

Implement a fixed-capacity generic circular buffer

This question evaluates knowledge of data structure design, generic types, in-place memory allocation, and constant-time FIFO operations required for ...

Coding & Algorithms
1
0
21 people solved
Feb 11, 2026
Atlassian logo
Atlassian
Medium
Software Engineer Locked

Merge intervals and design rating APIs

This question evaluates algorithmic problem-solving for interval manipulation and stateful data-structure design for maintaining and ordering agent av...

Coding & Algorithms
7
0
77 people solved
Feb 11, 2026
Intersystems logo
Intersystems
Easy
Software EngineerNew Grad

Find the longest palindromic substring

Problem Given a string s, find the longest contiguous substring of s that is a palindrome (reads the same forward and backward). Input - A string s co...

Coding & Algorithms
3
0
38 people solved
Feb 11, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Compute sums and maximum path in a tree

This question evaluates understanding and implementation of binary tree traversal, recursion, aggregation of node values, and computation of maximum s...

Coding & Algorithms
5
0
75 people solved
Feb 11, 2026
Vmware logo
Vmware
Medium
Software Engineer Locked

Compute iterative sliding-window sum reduction

This question evaluates algorithmic problem-solving and array-manipulation skills, focusing on sliding-window and iterative reduction concepts within ...

Coding & Algorithms
4
0
33 people solved
Feb 11, 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