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

Flip a specific bit in an integer

Given a non-negative integer num and a zero-based bit position p, return the integer resulting from flipping only the bit at position p (i.e., 0 becom...

Coding & Algorithms
9
0
91 people solved
Aug 1, 2025
Instacart logo
Instacart
Medium
Software Engineer

Evaluate arithmetic expression with precedence

Question Implement an evaluator for a string arithmetic expression. The input contains non-negative integers, the operators +, -, `, /, parentheses ( ...

Coding & Algorithms
8
0
78 people solved
Aug 1, 2025
Meta logo
Meta
Medium
Software Engineer

Solve PTO window and sparse unique counting

Solve PTO window and sparse unique counting Design algorithms for two problems: A) Longest vacation with limited PTO: Given an array A of characters w...

Coding & Algorithms
2
0
38 people solved
Aug 1, 2025
Uber logo
Uber
Medium
Software Engineer

Parse and evaluate nested expressions with validation

Design and implement a parser/evaluator for a parenthesized expression language where the input string may be invalid. The language uses spaces as tok...

Coding & Algorithms
3
0
60 people solved
Jul 31, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Compute shortest recursive string encoding

Given a string s, compress it by replacing any consecutive repetition of a substring with the form k{pattern} where k > 1 and pattern may itself be re...

Coding & Algorithms
5
0
55 people solved
Jul 31, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute max simultaneous drivers last 24 hours

Given delivery intervals (driverId, startTime, endTime) already recorded, implement maxSimultaneousDriverInPast24Hours() that returns the maximum numb...

Coding & Algorithms
30
0
210 people solved
Jul 31, 2025
Instacart logo
Instacart
Medium
Software Engineer

Evaluate arithmetic expression using DFS

Given a string representing an arithmetic expression with non-negative integers, +, -, *, /, parentheses, and optional spaces, evaluate its value. Use...

Coding & Algorithms
5
0
75 people solved
Jul 31, 2025
Instacart logo
Instacart
Medium
Software Engineer

Optimize file reads for password validation

Given a multi-gigabyte credentials file on disk with one record per line in the format user_id,salt,password_hash (hex), implement validate(user_id, p...

Coding & Algorithms
5
0
71 people solved
Jul 31, 2025
Fidelity logo
Fidelity
Medium
Software Engineer

Compare Spring and Spring Boot

Compare Spring and Spring Boot What are the differences between Spring Framework and Spring Boot? Compare configuration approaches, auto-configuration...

Coding & Algorithms
5
0
65 people solved
Jul 31, 2025
Amazon logo
Amazon
Medium
Software Engineer

Decide reachability with buses and limited walking

You are given: ( 1) a start point (xs, ys), ( 2) an end point (xe, ye), ( 3) an integer K, and ( 4) an undirected graph of bus stations where each nod...

Coding & Algorithms
3
0
38 people solved
Jul 31, 2025
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer

Compute ring window max and deletion indices

Part A — Ring window maximum: You are given n computers arranged in a circle, represented by an array of bits (1 = on, 0 = off), and an integer k (1 <...

Coding & Algorithms
8
0
79 people solved
Jul 31, 2025
DoorDash logo
DoorDash
Medium
Software EngineerSenior+

Solve BFS grid delivery routing

You are given an m×n grid representing a city: 'S' are DashMart stores, 'H' are homes, '.' are roads, and '#' are obstacles. Movement is allowed in fo...

Coding & Algorithms
8
0
71 people solved
Jul 31, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Compute sliding-window medians

Given an array nums and an integer k, compute the median for each contiguous subarray (window) of length k and return the sequence of medians in order...

Coding & Algorithms
2
0
34 people solved
Jul 31, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Check diagonal equality in a matrix

Given an m x n integer matrix, determine whether every top-left to bottom-right diagonal contains identical values (all elements along each such diago...

Coding & Algorithms
6
0
63 people solved
Jul 31, 2025
Salesforce logo
Salesforce
Medium
Software Engineer

Implement 64-bit modular exponentiation safely

Implement a function to compute (a^b) mod m where 0 ≤ a,b < 2^61−1 and 1 ≤ m < 2^61−1 using only 64-bit operations without overflow. Provide implement...

Coding & Algorithms
11
0
101 people solved
Jul 31, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Merge overlapping time intervals efficiently

Given a list of closed intervals [start, end] with 0 <= start <= end, merge all intervals that overlap or touch and return a minimal set of non-overla...

Coding & Algorithms
15
1
205 people solved
Jul 31, 2025
Vanta logo
Vanta
Medium
Software Engineer

Design test logging and failure-window queries

Build an in-memory service to log test run results and answer two queries. Assumptions: events arrive with strictly increasing timestamps across all t...

Coding & Algorithms
18
0
217 people solved
Jul 31, 2025
xAI logo
xAI
Medium
Software Engineer

Minimum Time to Run All Jobs with a Cooldown Between Identical Jobs

You are given a list of jobs to run on a single-core CPU, where each job is represented by an uppercase letter 'A'–'Z' in an array jobs. Jobs of the s...

Coding & Algorithms
1
0
8 people solved
Jul 30, 2025
Amazon logo
Amazon
Medium
Software Engineer

Implement basic calculator

Question LeetCode 227. Basic Calculator II – implement an arithmetic expression evaluator supporting +, -, *, / and integer operands https://leetcode....

Coding & Algorithms
10
0
33 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve LeetCode string and list problems

Question LeetCode 767. Reorganize String LeetCode 23. Merge k Sorted Lists LeetCode 138. Copy List with Random Pointer https://leetcode.com/problems/r...

Coding & Algorithms
12
0
45 people solved
Jul 29, 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