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
Voleon logo
Voleon
Hard
Software Engineer

Implement Kac ring with O(1) color and kstep

You are implementing a Kac ring dynamical system. Model - There are N positions arranged in a circle, indexed clockwise: 0, 1, ..., N-1. - Each positi...

Coding & Algorithms
45
0
395 people solved
Sep 24, 2025
Quora logo
Quora
Medium
Software Engineer

Count distinct palindromic subsequences

Given a string s consisting of lowercase English letters, compute how many distinct palindromic subsequence strings of lengths 2, 3, and 4 can be form...

Coding & Algorithms
6
0
48 people solved
Mar 19, 2026
Hackerrank logo
Hackerrank
Medium
Software Engineer Locked

Find Final Ball Holder

This question evaluates understanding of functional graphs, cycle detection, and handling large-step transitions in deterministic mappings where repea...

Coding & Algorithms
3
0
41 people solved
Mar 18, 2026
TikTok logo
TikTok
Medium
Software Engineer

Reverse nodes in even-length linked-list groups

Problem Given the head of a singly linked list, you will traverse the list in contiguous groups of increasing size: the 1st group has size 1, the 2nd ...

Coding & Algorithms
5
0
74 people solved
Dec 11, 2025
Roblox logo
Roblox
Easy
Data ScientistSenior+

Find maximum follow depth using recursion

You are given a directed follows relationship representing a social graph: - Each record (follower_id, followee_id) means follower_id follows followee...

Coding & Algorithms
14
0
216 people solved
Dec 11, 2025
Databricks logo
Databricks
Hard
Software EngineerNew Grad

Implement firewall matching with CIDR rules

Implement a simple IPv4 firewall rule matcher. Problem You are given an ordered list of firewall rules. Each rule has: - an action: ALLOW or DENY - a ...

Coding & Algorithms
11
1
177 people solved
Dec 10, 2025
TikTok logo
TikTok
Medium
Software Engineer

Compute length of longest increasing subsequence

You are given an integer array nums of length n. A subsequence of nums is a sequence that can be derived from nums by deleting zero or more elements w...

Coding & Algorithms
7
0
69 people solved
Dec 10, 2025
Meta logo
Meta
Medium
Software Engineer AI

Maximize Unique Characters from Words

You are given a list of lowercase English words. Select a subset of the words such that no character appears more than once across all selected words....

Coding & Algorithms
1
0
13 people solved
Mar 17, 2026
Goldman Sachs logo
Goldman Sachs
Medium
Software Engineer

Solve string and hashmap interview tasks

Coding questions (solve both) 1) First non-repeating character Given a string s, return the first character that appears exactly once in the string. -...

Coding & Algorithms
18
0
130 people solved
Dec 9, 2025
Meta logo
Meta
Medium
Software Engineer

Find kth largest element in array

Question Given an unsorted array of integers nums and an integer k, return the k-th largest element in the array. The 1st largest element is the maxim...

Coding & Algorithms
4
0
58 people solved
Dec 8, 2025
TikTok logo
TikTok
Hard
Machine Learning Engineer

Generate all safe queen placements on board

You are given an integer n representing the size of a chessboard (n × n). You need to place n queens on the board so that no two queens attack each ot...

Coding & Algorithms
4
0
42 people solved
Dec 8, 2025
Meta logo
Meta
Medium
Software Engineer

Merge overlapping intervals

You are given a list of closed intervals on the number line, where each interval is represented as a pair of integers [start, end] with start <= end. ...

Coding & Algorithms
4
0
48 people solved
Dec 8, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute cart total with best promotion

Assume you are implementing a checkout price calculator for an online shopping cart. You are given: - A list of items in the cart. Each item has: - ...

Coding & Algorithms
38
0
367 people solved
Dec 8, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Design crypto trading order control API

You are implementing part of a simple crypto trading system that manages client orders. Each order can be in one of several states: NEW, ACTIVE, PAUSE...

Coding & Algorithms
9
0
138 people solved
Dec 8, 2025
Scale AI logo
Scale AI
Medium
Software Engineer

Find LCA in a N-ary tree via DFS

You are given the root of a rooted N-ary tree (each node can have zero or more children) and two distinct nodes p and q that belong to the tree. Desig...

Coding & Algorithms
14
0
123 people solved
Dec 8, 2025
Axon logo
Axon
Medium
Software Engineer Locked

Design body camera checkout system

This question evaluates competency in in-memory data structure design, algorithmic complexity (achieving O(1) average operations), and randomized reso...

Coding & Algorithms
5
0
48 people solved
Mar 16, 2026
Pinduoduo logo
Pinduoduo
Easy
Software Engineer Locked

Determine Straight Flush

This question evaluates competency in algorithmic pattern detection and data-structure manipulation applied to domain-specific representations, focusi...

Coding & Algorithms
3
0
25 people solved
Mar 15, 2026
Google logo
Google
Easy
Software Engineer

Find largest group of two-digit numbers sharing digits

You are given an integer array A of length n (1 <= n <= 100). Each element is a two-digit number (e.g., from 10 to 99). Two numbers are considered con...

Coding & Algorithms
18
0
148 people solved
Dec 5, 2025
Bytedance logo
Bytedance
Medium
Data ScientistIntern

Count Same-Day Registered Posters

You are given two tables: `text users - user_id: unique identifier for a user - registered_at: timestamp when the user registered posts - post_id: uni...

Coding & Algorithms
0
0
6 people solved
Mar 14, 2026
Sealth logo
Sealth
Medium
Software Engineer Locked

Simulate Threshold Grid Infection

This question evaluates understanding of discrete grid-based simulations and local state-transition rules, focusing on modeling infection spread, neig...

Coding & Algorithms
3
0
27 people solved
Mar 13, 2026

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