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

Solve four algorithm design tasks

Solve the following four algorithmic tasks: 1) Implement wildcard pattern matcher: Given a text s and a pattern p where '?' matches any single charact...

Coding & Algorithms
5
0
62 people solved
Aug 13, 2025
IXL Learning logo
IXL Learning
Medium
Software Engineer

Find value on most distinct levels

Given a binary tree whose nodes store values (e.g., characters), find the value that appears on the greatest number of distinct depth levels. For exam...

Coding & Algorithms
7
0
63 people solved
Aug 13, 2025
Remitly logo
Remitly
Medium
Software Engineer

Design an Elevator System and Scheduler

Design an object-oriented elevator system. Define core classes and interfaces (elevator, controller, request, floor, buttons, sensors) and their inter...

Coding & Algorithms
22
0
158 people solved
Aug 13, 2025
Rippling logo
Rippling
Medium
Machine Learning Engineer

Implement stack and interval algorithms with tests

Implement three coding tasks and design your own unit tests for each. 1) Validate Bracket String with a Stack - Input: a string s containing only '(',...

Coding & Algorithms
10
0
75 people solved
Aug 12, 2025
BitGo logo
BitGo
Medium
Software Engineer

Solve and extend the Knapsack problem

You are given n items, each with an integer weight and value, and a knapsack capacity W. Implement 0/1 Knapsack to return the maximum total value and ...

Coding & Algorithms
3
0
63 people solved
Aug 12, 2025
Meta logo
Meta
Medium
Software Engineer

Validate a simplified numeric string

Implement isValidNumber (s) that returns true if and only if the ASCII string s represents a valid number under these simplified rules: - Optional lea...

Coding & Algorithms
5
0
59 people solved
Aug 12, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Design two-user communications handler with exceptions

Implement a two-user communications handler. Create: (A) CommsHandler(CommsHandlerABC) with methods connect(self, user1: Caller, user2: Caller) -> str...

Coding & Algorithms
2
0
25 people solved
Aug 12, 2025
Reevo logo
Reevo
Medium
Software Engineer

Check strings against dictionary efficiently

Given a large dictionary of unique words and a list of query strings, return for each query whether it exists in the dictionary. The dictionary may co...

Coding & Algorithms
10
0
103 people solved
Aug 12, 2025
Pika logo
Pika
Medium
Software Engineer

Implement text formatter and sum subarray products

1) Text formatter (LC-inspired variant): Given an array of words and an integer maxWidth W >= 1, break the words into lines so that the total length o...

Coding & Algorithms
5
0
78 people solved
Aug 12, 2025
Databricks logo
Databricks
Medium
Software Engineer

Design an efficient Tic-Tac-Toe engine

Design a Tic-Tac-Toe engine on an n x n board. Implement move(row, col, player) -> result where result indicates no winner, player1 wins, player2 wins...

Coding & Algorithms
23
0
163 people solved
Aug 11, 2025
Bank of America logo
Bank of America
Medium
Data Scientist

Convert number words to integer

Given a line containing an English phrase representing a number in the range −999,999,999 to 999,999,999, convert it to its integer value. Supported w...

Coding & Algorithms
4
0
66 people solved
Aug 11, 2025
Meta logo
Meta
Medium
Machine Learning EngineerSenior+

Solve matrix components, median, and traversals

1) Binary matrix component: Given an m x n grid of 0s (background) and 1s (objects), return the size of the largest connected component where connecti...

Coding & Algorithms
4
0
51 people solved
Aug 11, 2025
MathWorks logo
MathWorks
Medium
Software Engineer

Implement BFS shortest paths with reconstruction

Given an unweighted graph with n vertices and m edges represented as an adjacency list, implement breadth-first search (BFS) from a source vertex s to...

Coding & Algorithms
1
0
29 people solved
Aug 10, 2025
EvenUp logo
EvenUp
Medium
Software Engineer

Simulate a two-player card war game

Simulate a two-player card war game Implement a function to simulate a two-player card game. Each player has a queue of card ranks (top at index 0), w...

Coding & Algorithms
18
1
155 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Select maximum tasks before deadlines

Select maximum tasks before deadlines You are given a set of tasks, each with a positive duration and a deadline (lastDay). You may schedule tasks in ...

Coding & Algorithms
3
0
31 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Maximize stock profit with constraints

Maximize stock profit with constraints Given an array prices of daily stock prices, you may make at most two complete transactions (buy then sell). Af...

Coding & Algorithms
5
0
50 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute shortest path with obstacles

Compute shortest path with obstacles You are given an m×n grid with nonnegative cell costs and blocked cells marked '#'. You may move up, down, left, ...

Coding & Algorithms
4
0
55 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design a hierarchical locking tree

Design a hierarchical locking tree Design a LockingHierarchy data structure over a rooted tree of N nodes labeled 0..N-1, initialized with an integer ...

Coding & Algorithms
5
0
41 people solved
Aug 10, 2025
Lowe's logo
Lowe's
Medium
Software Engineer

Find longest unique substring

Find longest unique substring Given a string s, find the length and one example of the longest substring of s that contains no repeated characters. If...

Coding & Algorithms
3
0
31 people solved
Aug 10, 2025
Akuna Capital logo
Akuna Capital
Medium
Data Scientist

Count subarrays equal to target

Count subarrays equal to target Given an integer array nums and an integer k, count the number of contiguous subarrays whose sum equals k. Solve it in...

Coding & Algorithms
2
0
36 people solved
Aug 10, 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