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
Akuna Capital logo
Akuna Capital
Medium
Data Scientist

Maximize profitable pairs

Maximize profitable pairs You are given an array profits of n integers representing net profit per item and an integer threshold T. You may form disjo...

Coding & Algorithms
5
0
41 people solved
Aug 10, 2025
C3 AI logo
C3 AI
Hard
Data Scientist

Find longest substring with at least k repeats

Find longest substring with at least k repeats Longest substring where each character appears at least k times You are given: - a string s consisting ...

Coding & Algorithms
4
0
35 people solved
Aug 9, 2025
Amazon logo
Amazon
Medium
Software Engineer

Implement LRU cache with O(1) ops

Implement LRU cache with O(1) ops Design and implement a fixed-capacity cache supporting get(key) -> value and put(key, value) in O( 1) average time. ...

Coding & Algorithms
5
0
56 people solved
Aug 9, 2025
Amazon logo
Amazon
Medium
Software Engineer

Validate 9x9 grid in one pass

Validate 9x9 grid in one pass Given a partially filled 9x9 board using digits '1'–'9' and '.' for empty cells, determine whether the current configura...

Coding & Algorithms
5
0
59 people solved
Aug 9, 2025
NVIDIA logo
NVIDIA
Medium
Software Engineer

Design algorithms for test scheduling

Design algorithms for test scheduling You have tens of thousands of graphics test cases with inter-test dependencies and hardware/driver constraints. ...

Coding & Algorithms
4
0
71 people solved
Aug 9, 2025
Adobe logo
Adobe
Medium
Machine Learning Engineer

Determine if a multiple-sum subarray exists

Determine if a multiple-sum subarray exists Given an integer array nums and an integer k, determine whether there exists a contiguous subarray of leng...

Coding & Algorithms
14
0
108 people solved
Aug 9, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Find minimum processing rate

Find minimum processing rate You are given an array piles where piles[i] is the number of items in the i-th pile and an integer H (total hours). Find ...

Coding & Algorithms
5
0
48 people solved
Aug 9, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer

Solve capital selection and grid escape

Solve capital selection and grid escape Implement two functions for algorithmic practice: 1) MaximizeCapitalAfterProjects(k, initialCapital, requiredC...

Coding & Algorithms
8
0
117 people solved
Aug 9, 2025
Expedia logo
Expedia
Medium
Software Engineer

Count vowel-only substrings with all vowels

Count vowel-only substrings with all vowels Given a lowercase English string s, return the number of contiguous substrings that ( 1) consist only of v...

Coding & Algorithms
10
0
80 people solved
Aug 9, 2025
Databricks logo
Databricks
Medium
Software Engineer

Solve graph path, interval deletion, and robbery

Solve graph path, interval deletion, and robbery Part A — Optimal path with transport modes: You are given a directed weighted graph of a city. Each e...

Coding & Algorithms
19
0
288 people solved
Aug 9, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Solve swaps, graph paths, and movie DP

Solve swaps, graph paths, and movie DP Design and implement solutions for three tasks derived from a HackerRank-style assessment. 1) Minimum swaps to ...

Coding & Algorithms
2
0
46 people solved
Aug 8, 2025
Amazon logo
Amazon
Medium
Software Engineer

Determine string segmentability with dictionary

Determine string segmentability with dictionary Given a string s and a dictionary of words, determine whether s can be segmented into a sequence of di...

Coding & Algorithms
3
0
30 people solved
Aug 8, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Generate the next lexicographic array arrangement

Generate the next lexicographic array arrangement Given an integer array nums (which may include negative numbers and duplicates), modify nums in plac...

Coding & Algorithms
4
0
54 people solved
Aug 8, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute nearest courier for each customer

Compute nearest courier for each customer You are given two sets of 2D points: customers C = {c1..cn} and active couriers (dashers) D = {d1..dm}. Each...

Coding & Algorithms
5
0
84 people solved
Aug 8, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Recommend movies by shared ratings

Recommend movies by shared ratings Write a function recommendations(user, ratings) that returns a list of movies to recommend to the given user based ...

Coding & Algorithms
6
0
70 people solved
Aug 7, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Count users over n connections

Count users over n connections Given a stream of relationship events in the form [[user_a, user_b, op], ...], where op ∈ {"connect", "disconnect"}, tr...

Coding & Algorithms
7
0
51 people solved
Aug 7, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design LCA with flexible inputs and rule

Design LCA with flexible inputs and rule Design a function to find the lowest common manager of two employees in an organizational tree. Support two i...

Coding & Algorithms
5
0
50 people solved
Aug 7, 2025
PayPal logo
PayPal
Medium
Software Engineer

Describe std::string copy semantics

Describe std::string copy semantics In C++, what happens with std::string when you write: std::string a = "123"; std::string b = a; Describe which ope...

Coding & Algorithms
4
0
41 people solved
Aug 7, 2025
Meta logo
Meta
Medium
Software Engineer

Sort a string by custom order

Sort a string by custom order Given a priority string P of distinct characters and a text string S, reorder S so that all characters appearing in P co...

Coding & Algorithms
3
0
39 people solved
Aug 7, 2025
Meta logo
Meta
Medium
Software Engineer

Find power-of-two subarrays within sum range

Find power-of-two subarrays within sum range Given an integer array nums and an integer k, find all subarrays whose length is a power of two and whose...

Coding & Algorithms
3
0
29 people solved
Aug 7, 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