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

Compute longest rising path in a grid

Given an m×n grid of integers, find the length of the longest path where each step moves up, down, left, or right to a strictly larger value. Return t...

Coding & Algorithms
3
0
43 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Optimize flight costs and find grid path

1) Given two integer arrays D and R of equal length n, where D[i] is the cost to depart on day i and R[j] is the cost to return on day j, choose indic...

Coding & Algorithms
4
0
31 people solved
Sep 6, 2025
Databricks logo
Databricks
Medium
Software Engineer

Design IP/CIDR rule matcher

Design and implement a rule matcher that returns 'accept' or 'deny' for a given IPv4 address based on a set of rules. Each rule can be either an inclu...

Coding & Algorithms
26
0
253 people solved
Sep 6, 2025
HubSpot logo
HubSpot
Medium
Software Engineer

Design file deduplication at scale

Design an algorithm to identify duplicate files in a large directory tree. You are given an iterator over files providing (path, size) and a function ...

Coding & Algorithms
5
0
75 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Find earliest common meeting slot

Question Given the calendars of N attendees, find the earliest time window of length at least d minutes during which all attendees are simultaneously ...

Coding & Algorithms
11
0
82 people solved
Sep 6, 2025
Cerebras logo
Cerebras
Medium
Software Engineer

Implement Binary Search in C++

From scratch in C++, implement binary search over a sorted array to locate a target value. Provide a correct iterative implementation, handle not-foun...

Coding & Algorithms
7
0
73 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Solve vault rate and subset-sum

1) Robber vaults rate: You are given an array vaults of positive integers where vaults[i] is the amount in the i-th vault, and an integer h (hours). I...

Coding & Algorithms
7
0
65 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design faster delay-time computation

You are given an array of integers representing task priorities. Tasks execute from right to left. For each index i, define its delay time as j - i wh...

Coding & Algorithms
2
0
34 people solved
Sep 6, 2025
Pinterest logo
Pinterest
Medium
Software Engineer

Implement string-based big integer multiplication

Question Implement multiplyStrings(a, b) to multiply two non-negative integers given as decimal strings and return their product as a decimal string. ...

Coding & Algorithms
14
0
105 people solved
Sep 6, 2025
Stripe logo
Stripe
Medium
Software Engineer

Compute currency conversions with graph algorithms

Question You are given a set of pairwise currency exchange relations such as A:B = 1:1.5 and B:C = 1:1.5, meaning 1 A = 1.5 B and 1 B = 1.5 C. Design ...

Coding & Algorithms
3
0
31 people solved
Sep 6, 2025
UiPath logo
UiPath
Medium
Machine Learning Engineer

Implement cocktail shaker sort and analyze

Implement the cocktail shaker sort (bidirectional bubble sort) for an array of integers. Optimize it with early termination and shrinking bounds, and ...

Coding & Algorithms
4
0
34 people solved
Sep 6, 2025
Instacart logo
Instacart
Medium
Software Engineer

Solve expression evaluator and string decoder

1) Implement an arithmetic expression evaluator that reads expressions from a text file (one expression per line) and outputs the evaluated result for...

Coding & Algorithms
28
0
216 people solved
Sep 6, 2025
MathWorks logo
MathWorks
Medium
Software Engineer

Find shortest path using BFS

Given an m×n grid grid where grid[r][c] = 0 represents an empty cell and 1 represents a wall, a start cell (sr, sc), and a target cell (tr, tc), you m...

Coding & Algorithms
2
0
30 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Machine Learning Engineer

Design room progression with leaderboard

Design a data structure to simulate a sequence of rooms where players solve tasks and can move only to the next room once finished. Support the follow...

Coding & Algorithms
14
0
117 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Determine frog reachability across stones

You are given a sorted array of distinct integers stones representing stone positions in a river, where stones[0] = 0. A frog starts on stone 0; its f...

Coding & Algorithms
3
0
28 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Find top co-purchased products

You receive purchase logs where each order is represented as an integer array of product IDs bought together in a single transaction. Implement a func...

Coding & Algorithms
3
0
51 people solved
Sep 6, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Implement a ring buffer

Implement a fixed-capacity circular buffer (ring buffer) supporting push, pop, peek, isEmpty, isFull, and size in O( 1) time using an array. Define an...

Coding & Algorithms
11
0
96 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Solve parsing, counting, ranges, and window problems

Solve the following four algorithm problems: 1) Expression evaluator with + and : Given a string s containing non-negative integers, '+' and '' operat...

Coding & Algorithms
2
0
27 people solved
Sep 6, 2025
Snowflake logo
Snowflake
Medium
Software Engineer

Compute shortest path between tree nodes

Question You are given the root of a binary tree (not necessarily a BST) whose nodes have integer values, and two target values u and v. Implement a f...

Coding & Algorithms
4
0
79 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Reverse sublist between equal-value nodes

Given the head of a singly linked list and a target value v that appears at least twice, reverse the sublist starting at the first node with value v a...

Coding & Algorithms
4
0
39 people solved
Sep 6, 2025

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