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

Find the Most Frequent Character with a Tie-Breaker

Find the Most Frequent Character with a Tie-Breaker Implement most_frequent_character(text). text is a non-empty string of lowercase English letters. ...

Coding & Algorithms
1
0
12 people solved
Jul 12, 2026
Meta logo
Meta
Medium
Data Engineer

Solve SQL and Python coding tasks

You are given a small library system with the following relational schema and several Python data-processing tasks. Answer the SQL questions and imple...

Coding & Algorithms
63
5
425 people solved
Nov 20, 2025
Meta logo
Meta
Medium
Software EngineerSenior+ AI

Solve Three Coding Interview Problems

The interview included three coding tasks: 1. Common ancestor in an N-ary tree You are given the root of an N-ary tree and two target nodes. Dete...

Coding & Algorithms
4
0
53 people solved
Feb 2, 2026
Coinbase logo
Coinbase
Hard
Machine Learning Engineer Locked

Implement local maxima, bagging, and k-means

This set of tasks evaluates algorithmic problem-solving and implementation skills across array processing (local maxima), ensemble methods (bagging cl...

Coding & Algorithms
19
0
131 people solved
Feb 1, 2026
Two Sigma logo
Two Sigma
Medium
Software Engineer Locked

Implement Price-Time Order Matching

This question evaluates understanding of limit-order book mechanics, priority-based matching, stateful stream processing, and data-structure managemen...

Coding & Algorithms
5
0
35 people solved
May 9, 2026
Harvey logo
Harvey
Hard
Software Engineer Locked

Implement Spreadsheet Cell Updates

This question evaluates skills in data structures, expression parsing, dependency graph management, incremental evaluation, and cycle detection for ma...

Coding & Algorithms
4
0
24 people solved
May 9, 2026
Twitch logo
Twitch
Medium
Software Engineer

Solve four design-leaning coding problems

You are given four independent interview-style coding tasks. For each task, implement the requested function/class with clear inputs/outputs and reaso...

Coding & Algorithms
18
0
134 people solved
Oct 26, 2025
Amazon logo
Amazon
Hard
Software EngineerIntern

Return all valid word-break sentences

Given a string s and a dictionary of strings wordDict, insert spaces into s to form a sentence such that every token is in wordDict. Return all possib...

Coding & Algorithms
11
0
203 people solved
Jan 15, 2026
xAI logo
xAI
Hard
Software Engineer Locked

Maximize distinct values after unique ± offsets

This question evaluates combinatorial reasoning and algorithmic optimization skills, focusing on transforming arrays under distinct integer-offset con...

Coding & Algorithms
37
1
268 people solved
Jan 22, 2026
Meta logo
Meta
Medium
Software Engineer

Select words to maximize unique characters

Problem You are given an array of strings words. You may choose any subset of these strings and concatenate the chosen strings in any order. Your goal...

Coding & Algorithms
38
0
516 people solved
Dec 15, 2025
Newrelic logo
Newrelic
Hard
Software Engineer

Maximum Path Sum in an Indexed Binary Tree

Maximum Path Sum in an Indexed Binary Tree A nonempty binary tree is represented without custom node objects. values[i] is the value of node i. childr...

Coding & Algorithms
0
0
10 people solved
Jul 10, 2026
Snapchat logo
Snapchat
Medium
Software Engineer Locked

Maximize correct guesses in a hat line puzzle

This question evaluates logical reasoning about information constraints, group strategy design, and combinatorial encoding in the Coding & Algorithms ...

Coding & Algorithms
9
0
86 people solved
Feb 12, 2026
Optiver logo
Optiver
Medium
Software Engineer Locked

Calculate Days Between Arbitrary Gregorian Dates

Calculate the absolute number of days between arbitrary valid Gregorian dates without enumerating each day or relying on a limited date library. Accou...

Coding & Algorithms
1
0
19 people solved
May 29, 2026
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer

Sample uniformly from a circle’s area

How would you generate a point (x, y) uniformly at random from the area of a circle of radius R centered at the origin? - Explain why naive choices (e...

Coding & Algorithms
16
0
124 people solved
Feb 18, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer

The Celebrity Problem

The Celebrity Problem At a party there are n people, labeled 0 to n - 1. Among them there may be exactly one celebrity — a person who satisfies both o...

Coding & Algorithms
0
0
8 people solved
Jun 23, 2026
Anthropic logo
Anthropic
Hard
Software Engineer

Simulate Threshold Infection Efficiently

Simulate Threshold Infection Efficiently You are given an m x n grid, a set of initially infected cells, and an integer threshold k. Time advances in ...

Coding & Algorithms
2
0
13 people solved
Jul 8, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Spreading Contagion on a Grid

This question tests graph traversal and multi-source BFS on a 2D grid, evaluating a candidate's ability to model simultaneous state propagation across...

Coding & Algorithms
3
0
22 people solved
Jun 8, 2026
Uber logo
Uber
Hard
Software Engineer Locked

Schedule Non-Overlapping Meetings Efficiently

This question evaluates understanding of interval scheduling and overlap detection, proficiency in selecting efficient data structures for dynamic ord...

Coding & Algorithms
8
0
65 people solved
May 2, 2026
Vanta logo
Vanta
Easy
Software Engineer Locked

Implement a Unique Lines Command

This question evaluates mastery of file I/O, streaming algorithms, stateful line processing, and memory-efficient handling of large inputs, situating ...

Coding & Algorithms
3
0
33 people solved
May 25, 2026
Adobe logo
Adobe
Medium
Software Engineer Locked

Traverse a path and print directory tree

This question evaluates proficiency with filesystem I/O, path validation, directory traversal, recursion and error handling in Node.js, plus the abili...

Coding & Algorithms
13
0
132 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