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

Simulate meeting-room bookings and return busiest room

This question evaluates a candidate's competence in scheduling and resource-allocation algorithms, focusing on simulation of interval-based bookings, ...

Coding & Algorithms
15
0
159 people solved
Mar 1, 2026
Capital One logo
Capital One
Medium
Data Engineer

Write SQL using joins and window functions

SQL Coding: Rank within Groups with Joins You are given two tables: accounts - account_id (string) - customer_id (string) - segment (string) — e.g., "...

Coding & Algorithms
28
1
191 people solved
Mar 1, 2026
Coinbase logo
Coinbase
Hard
Software Engineer

Implement a crypto order management system

You are building an in-memory crypto order management system. You must parse commands from standard input and print outputs for query commands. Order ...

Coding & Algorithms
13
0
252 people solved
Mar 1, 2026
Snapchat logo
Snapchat
Medium
Software Engineer Locked

Implement a custom list with iterator and map

This question evaluates proficiency in data structures and generic collection implementation, specifically list operations, iterator semantics, and hi...

Coding & Algorithms
8
0
86 people solved
Mar 1, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Answer common graph, grid, and array tasks

This set of problems evaluates algorithmic skills across arrays, graph theory, and grid/matrix traversal—covering sliding-window and contiguous-segmen...

Coding & Algorithms
23
0
207 people solved
Mar 1, 2026
Axon logo
Axon
Medium
Software Engineer

Find accessible devices via nested memberships

Problem You are given an access model with nested groups: - A group can contain users and also contain other groups (subgroups). - A user can own or b...

Coding & Algorithms
14
0
96 people solved
Mar 1, 2026
Roblox logo
Roblox
Medium
Machine Learning EngineerSenior+ Locked

Find Windows Containing a Target

This question evaluates array traversal and interval-containment reasoning, including handling inclusive endpoints, overlapping intervals, and preserv...

Coding & Algorithms
0
0
11 people solved
May 7, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Implement Minesweeper and Word Search

This multi-part prompt evaluates grid-based algorithmic skills, including randomized board construction with neighbor counting, straight-line pattern ...

Coding & Algorithms
2
0
15 people solved
May 7, 2026
SoFi logo
SoFi
Easy
Software Engineer

Count completed car journeys from sensor logs

You are given a time-ordered list of highway sensor logs. Each log entry contains: - timestamp (integer; strictly increasing) - sensor_type (one of "E...

Coding & Algorithms
6
0
98 people solved
Jan 3, 2026
Databricks logo
Databricks
Medium
Software EngineerIntern

Design Tic-Tac-Toe and QPS data structures

You are given two independent coding problems that focus on data structure and API design. --- Problem 1: Generalized Tic-Tac-Toe Game with Simple AI ...

Coding & Algorithms
51
0
369 people solved
Nov 13, 2025
Duolingo logo
Duolingo
Easy
Software Engineer Locked

Implement String Encryption and Decryption

This question evaluates understanding of string encoding and mapping, including handling non-bijective character-to-code relationships and performing ...

Coding & Algorithms
4
0
32 people solved
Jan 2, 2026
PayPal logo
PayPal
Hard
Data Scientist

Explain differences between Python list and tuple

In Python, what are the key differences between a list and a tuple? Cover: - Mutability and implications - Performance and memory considerations (high...

Coding & Algorithms
4
0
63 people solved
Jan 2, 2026
Roblox logo
Roblox
Medium
Machine Learning Engineer Locked

Find target-heavy sliding windows

This question evaluates array manipulation, counting and efficient algorithm design—focusing on the sliding-window technique for detecting and quantif...

Coding & Algorithms
8
0
79 people solved
Feb 27, 2026
xAI logo
xAI
Medium
Software Engineer

Sort a Large Array Using Multiple Threads

Sort a Large Array Using Multiple Threads You are given a large array of integers nums and a thread count k. Sort the array in ascending order using m...

Coding & Algorithms
1
0
14 people solved
Sep 23, 2025
Nuro logo
Nuro
Medium
Software Engineer

Find gaps between intervals

You are given a list of integer intervals intervals, where each interval is represented as [start, end] (inclusive), and start <= end. Two intervals m...

Coding & Algorithms
14
0
221 people solved
Nov 9, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Find k closest values in a BST

Find k closest values in a BST Given a binary search tree with n nodes and a real target t, return k node values whose distances to t are smallest. Im...

Coding & Algorithms
5
0
101 people solved
Aug 10, 2025
Pinduoduo logo
Pinduoduo
Medium
Software EngineerSenior+

Validate a Binary Search Tree

Validate a Binary Search Tree Problem Given a binary tree, return whether it is a valid binary search tree. For every node, every value in its left su...

Coding & Algorithms
0
0
5 people solved
May 4, 2026
Uber logo
Uber
Medium
Frontend Engineer Locked

Implement a Constant-Time Random Pool

This question evaluates a candidate's ability to design and implement an efficient data structure supporting average O(1) add, remove, and uniform ran...

Coding & Algorithms
1
0
15 people solved
May 4, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Implement Cache Eviction And Seat Assignment

This question evaluates understanding of data structure design and algorithmic reasoning, covering cache eviction policies (least-recently-used) and s...

Coding & Algorithms
0
0
9 people solved
May 4, 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