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

Minimize cost & recommend movies

Question Given arrays size[] and cost[] where size[i] is the size of the i-th product and cost[i] is the cost to increase size[i] by one unit, compute...

Coding & Algorithms
18
0
63 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve three LeetCode coding problems

Question LeetCode 1249. Minimum Remove to Make Valid Parentheses LeetCode 827. Making A Large Island LeetCode 199. Binary Tree Right Side View https:/...

Coding & Algorithms
8
0
25 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Find integer in most intervals

Question Given N integer intervals [ai, bi] (positive integers), find an integer that belongs to the maximum number of intervals (return any such inte...

Coding & Algorithms
7
0
19 people solved
Jul 29, 2025
Roblox logo
Roblox
Medium
Software Engineer

Randomly partition array into k segments

Question Given a list of integers and an integer k representing the number of segments, write a function that randomly partitions the list into k non-...

Coding & Algorithms
25
0
68 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve island connectivity and string multiplication

Question Given N distinct islands (e.g., a, b, c…) and a list of existing undirected paths between them, compute the minimum number of additional path...

Coding & Algorithms
11
0
51 people solved
Jul 29, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Count islands and distinct shapes

Question LeetCode 200. Number of Islands LeetCode 694. Number of Distinct Islands https://leetcode.com/problems/number-of-islands/description/ https:/...

Coding & Algorithms
4
0
20 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve island and frequency problems

Question LeetCode 200. Number of Islands – given a 2D grid, count the number of connected islands of '1's using DFS/BFS/Union-Find. LeetCode 695. Max ...

Coding & Algorithms
41
0
67 people solved
Jul 29, 2025
Harvey logo
Harvey
Medium
Software Engineer

Handle multi-source string matching and tagging

Question Given an LLM output string and a list of source strings, design an algorithm to count how many times each source appears in the output. Exten...

Coding & Algorithms
20
0
51 people solved
Jul 29, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Implement in-memory DB querying

Question Implement an in-memory database that supports: 1. Querying the whole table and returning only selected columns (projection). 2. Adding WHERE ...

Coding & Algorithms
191
1
663 people solved
Jul 29, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement thread-safe blocking queue

Question Design and implement a thread-safe bounded blocking queue that supports concurrent enqueue and dequeue operations using standard synchronizat...

Coding & Algorithms
8
0
13 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute minimum passes over permutation

Question You are given an array shelf representing a permutation of the integers 1..n. Starting with target = 1, you repeatedly scan the array left-to...

Coding & Algorithms
66
0
139 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve diverse LeetCode algorithm problems

Question LeetCode 695. Max Area of Island LeetCode 380. Insert Delete GetRandom O( 1) LeetCode 19. Remove Nth Node From End of List LeetCode 1004. Max...

Coding & Algorithms
3
0
14 people solved
Jul 29, 2025
Pinterest logo
Pinterest
Medium
Software Engineer

Round numeric string values

Question Given a numeric string, implement rounding to the nearest integer (e.g., '3.5' → '4', '100.01' → '100'). Follow-up: round to the last signifi...

Coding & Algorithms
14
0
33 people solved
Jul 29, 2025
Google logo
Google
Medium
Software Engineer

Find shortest path with blocked nodes

Question Given an unweighted graph, a start node, an end node, and a block_set of nodes that cannot be traversed, return the length of the shortest pa...

Coding & Algorithms
6
0
9 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve intervals and distinct islands

Question LeetCode 56. Merge Intervals LeetCode 694. Number of Distinct Islands https://leetcode.com/problems/merge-intervals/description/ https://leet...

Coding & Algorithms
6
0
22 people solved
Jul 29, 2025
Instacart logo
Instacart
Medium
Software Engineer

Parse password from indexed matrix file

Question Given a filepath to a text file containing one index line [x, y] followed by a matrix of characters (origin at lower-left (0, 0)), return the...

Coding & Algorithms
29
0
69 people solved
Jul 29, 2025
NVIDIA logo
NVIDIA
Medium
Software Engineer

Reconstruct tree from inorder and postorder

Given two arrays representing the inorder and postorder traversals of a binary tree with unique values, reconstruct the original binary tree and retur...

Coding & Algorithms
8
0
57 people solved
Jul 29, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Find index of first unique character

Find index of first unique character Given a string s, return the index of the first character that appears exactly once; if none exists, return -1. A...

Coding & Algorithms
6
0
43 people solved
Jul 28, 2025
Citadel logo
Citadel
Medium
Data Scientist

Implement two-pointer unique-pair sum search

Implement two-pointer unique-pair sum search Given a nondecreasing integer array nums and an integer target, return all unique value pairs [a, b] with...

Coding & Algorithms
8
0
83 people solved
Jul 27, 2025
Chime logo
Chime
Medium
Software Engineer

Find missing number from concatenated digits

Given an integer n (1 ≤ n ≤ 99) and a digit string s formed by concatenating the decimal representations of the integers 1..n except for one missing n...

Coding & Algorithms
57
0
381 people solved
Jul 27, 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