Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Salesforce logo
Salesforce
Medium
Software Engineer

Determine minimal substitutions and removals

Question Given a list of words, determine the minimum number of character substitutions required so that, in every word, no two adjacent characters ar...

Coding & Algorithms
19
0
40 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve LeetCode array & stream problems

Question LeetCode 346. Moving Average from Data Stream LeetCode 249. Group Shifted Strings LeetCode 163. Missing Ranges Remove duplicates from a chara...

Coding & Algorithms
19
0
60 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Software Engineer

Determine Rounds for Star Substring Threshold

Question Given a string S, an offset array O (replacement order), and an integer M, repeatedly replace S[O[i]] with ''. Determine the minimum number o...

Coding & Algorithms
11
0
31 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve classic LeetCode problems

Question LeetCode 215. Kth Largest Element in an Array LeetCode 249. Group Shifted Strings Variant of LeetCode 56. Merge Intervals extended to 2-D rec...

Coding & Algorithms
7
0
34 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve diameter and shortest bridge problems

Question LeetCode 543. Diameter of Binary Tree LeetCode 934. Shortest Bridge https://leetcode.com/problems/diameter-of-binary-tree/description/ https:...

Coding & Algorithms
19
0
58 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve 4 LeetCode algorithm problems

Question LeetCode 636. Exclusive Time of Functions LeetCode 253. Meeting Rooms II LeetCode 314. Binary Tree Vertical Order Traversal LeetCode 215. Kth...

Coding & Algorithms
1
0
7 people solved
Jul 29, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute concurrent online drivers

Question Given each driver’s chronologically sorted delivery records, build an algorithm that, for a timestamp t, returns how many distinct drivers we...

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

Check tree nodes equal subtree average

Question LeetCode 2265. Count Nodes Equal to Average of Subtree – Adapted: Verify that every node’s value equals the average of all values in its subt...

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

Find Top K Frequent Elements

Question LeetCode 347. Top K Frequent Elements – given an integer array nums, return the k most frequent elements. Initial requirement: return the top...

Coding & Algorithms
5
0
19 people solved
Jul 29, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Find lowest common ancestor

Question LeetCode 236. Lowest Common Ancestor of a Binary Tree — Given a binary tree, find the lowest common ancestor (LCA) of two given nodes. Follow...

Coding & Algorithms
8
0
35 people solved
Jul 29, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Reverse a linked list

Question LeetCode 206. Reverse Linked List — Given the head of a singly linked list, reverse the list and return the reversed list. https://leetcode.c...

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

Compare two string linked lists

Question Given two singly linked lists where each node stores one character as a string, determine whether the sequences of characters represented by ...

Coding & Algorithms
7
0
20 people solved
Jul 29, 2025
Stripe logo
Stripe
Medium
Software Engineer

Convert bitmap into ASCII characters

Question Given an array/string of 0-1 bits representing a bitmap font, write code to render each character as a grid using '.' for 0 and '#' for 1, an...

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

Find largest island area

Question Given a 2D grid of 0s and 1s, find the largest area of a connected group of 1s (island) using 4-directional adjacency; return that area. (Var...

Coding & Algorithms
14
0
21 people solved
Jul 29, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Count changed nodes in N-ary trees

Question Given two N-ary trees (old and new versions) where each node has a key (string), value (int), and list of children, compute how many nodes ar...

Coding & Algorithms
13
0
45 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve various LeetCode data-structure questions

Question LeetCode 129. Sum Root to Leaf Numbers LeetCode 2089. Find Target Indices After Sorting Array LeetCode 270. Closest Binary Search Tree Value ...

Coding & Algorithms
16
0
46 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Design prefix-sum function and max stack

Question LeetCode 303. Range Sum Query – Immutable (design a reusable prefix-sum function) LeetCode 716. Max Stack (similar design question) https://l...

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

Find closest BST value and remove parentheses

Question LeetCode 270. Closest Binary Search Tree Value LeetCode 1249. Minimum Remove to Make Valid Parentheses (follow-up: achieve without using a st...

Coding & Algorithms
13
0
55 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve tree leaf sum and target indices search

Question LeetCode 129. Sum Root to Leaf Numbers LeetCode 2089. Find Target Indices After Sorting Array (array already sorted; require O(log n) time) h...

Coding & Algorithms
7
0
34 people solved
Jul 29, 2025
Talroo logo
Talroo
Medium
Software Engineer

Calculate area, flush probability, egg drops

Question Given two quarter-circles inside a 1×1 square (centers at bottom-left and top-right corners), find the exact area of their overlapping region...

Coding & Algorithms
85
0
284 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