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

Determine whether two nodes are related

This question evaluates understanding of graph representations, reachability and connectivity concepts for ancestry relationships, including handling ...

Coding & Algorithms
29
1
198 people solved
Jan 22, 2026
TikTok logo
TikTok
Hard
Software Engineer Locked

Solve three string/stack/backtracking problems

This set evaluates proficiency with algorithmic patterns—stack-based and monotonic-stack reasoning for visibility problems, backtracking for combinato...

Coding & Algorithms
3
0
49 people solved
Jan 22, 2026
J.P. Morgan logo
J.P. Morgan
Medium
Data Scientist Locked

Solve tiling, probability, and nested-radical puzzles

This multi-part question evaluates combinatorics and algorithmic skills through 2×N and 3×N domino tiling problems, analysis of an infinite nested squ...

Coding & Algorithms
4
0
38 people solved
Jan 22, 2026
Atlassian logo
Atlassian
Medium
Software Engineer Locked

Determine whether a word exists in a letter grid

This question evaluates algorithmic problem-solving and implementation skills in grid-based search, including concepts like graph traversal and backtr...

Coding & Algorithms
4
0
36 people solved
Jan 22, 2026
MongoDB logo
MongoDB
Medium
Software Engineer Locked

Implement a thread-safe high-concurrency LRU cache

This question evaluates understanding of concurrent data structures, synchronization strategies, and LRU cache semantics within the Coding & Algorithm...

Coding & Algorithms
18
0
148 people solved
Jan 22, 2026
Crowdstrike logo
Crowdstrike
Medium
Software Engineer Locked

Count connected components in a binary grid

This question evaluates understanding of graph traversal and connected-components detection on a 2D grid, measuring the ability to model grid cells as...

Coding & Algorithms
6
0
63 people solved
Jan 22, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist Locked

Maximize profit from one stock trade

This question evaluates algorithmic problem-solving skills with emphasis on array processing, numeric optimization, and time/space complexity analysis...

Coding & Algorithms
7
1
113 people solved
Jan 22, 2026
J.P. Morgan logo
J.P. Morgan
Easy
Software Engineer Locked

Group strings that are anagrams

This question evaluates skills in string manipulation, grouping by character composition, and the use of hashing or sorting techniques to construct ke...

Coding & Algorithms
3
0
40 people solved
Jan 22, 2026
Netflix logo
Netflix
Medium
Software Engineer

Dedupe titles in per-shelf viewport

You are rendering a streaming app home page. - The home page consists of shelves displayed from top to bottom. - Each shelf contains a list of titleId...

Coding & Algorithms
12
1
101 people solved
Jan 22, 2026
Airbnb logo
Airbnb
Hard
Software Engineer Locked

Detect overlap of two linked lists with cycles

This question evaluates understanding of linked list data structures, cycle detection techniques, pointer/reference identity, and algorithmic time/spa...

Coding & Algorithms
3
0
47 people solved
Jan 22, 2026
Karat logo
Karat
Medium
Software Engineer

Validate password and list rule violations

Problem You are given a password string p. Validate it against a set of rules and return all rules that the password violates. Rules 1. Length must be...

Coding & Algorithms
11
0
178 people solved
Jan 22, 2026
Ge logo
Ge
Medium
Software Engineer

Minimize total distance to a store

Question 1: Choose a CVS location to minimize total distance You are given an M x N grid grid containing only 0 and 1. - grid[r][c] = 1 means there is...

Coding & Algorithms
5
0
41 people solved
Jan 22, 2026
Attentive logo
Attentive
Medium
Software EngineerNew Grad

Remove Repeated Character Groups

You are given a string s and an integer k. Repeatedly remove any contiguous group of k identical characters. After a removal, the remaining parts of t...

Coding & Algorithms
5
0
39 people solved
Apr 13, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Implement Social Graph Snapshot Queries

This question evaluates understanding of graph data structures, query-efficient indexing, and algorithmic trade-offs for static directed graphs, inclu...

Coding & Algorithms
4
0
62 people solved
Apr 13, 2026
Sierra logo
Sierra
Medium
Software Engineer

Process time intervals and detect overlaps/gaps

You are given n time intervals representing debug log segments. Each interval has a start time, an end time, and an associated text message. - Each in...

Coding & Algorithms
39
0
402 people solved
Nov 14, 2025
Amazon logo
Amazon
Medium
Software EngineerIntern Locked

Return a valid task order

This question evaluates understanding of graph algorithms and dependency resolution, testing the ability to produce a valid ordering of tasks and reco...

Coding & Algorithms
3
0
39 people solved
Jan 21, 2026
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Implement LRU cache and copy random list

This question evaluates competency in data-structure design, pointer and memory management, and hashing-based eviction policies by combining a deep-co...

Coding & Algorithms
6
0
47 people solved
Jan 21, 2026
Harvey logo
Harvey
Medium
Software Engineer

Implement a Hierarchical File System

Implement an in-memory hierarchical file system. Create a class FileSystem with the following methods: - FileSystem() initializes an empty file system...

Coding & Algorithms
0
0
13 people solved
Apr 12, 2026
Sealth logo
Sealth
Easy
Machine Learning Engineer Locked

Implement one-cluster k-means

This question evaluates understanding of clustering algorithms and optimization of within-cluster squared error for the special case k = 1, along with...

Coding & Algorithms
2
0
31 people solved
Apr 12, 2026
Bytedance logo
Bytedance
Medium
Software Engineer Locked

Implement an LRU Cache

This question evaluates competency in designing efficient stateful data structures, understanding cache eviction policies (least recently used), and m...

Coding & Algorithms
1
0
23 people solved
Apr 12, 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