Coding & Algorithms Interview Questions

Practice 3,469 real coding and algorithms interview questions reported from interviews at Meta, Amazon, Google, Uber and Microsoft. The mix follows what these loops actually ask: arrays and strings, hash maps, two pointers and sliding windows, binary search, linked lists, trees and graphs, BFS and DFS, recursion and backtracking, dynamic programming, heaps and priority queues, and the occasional design-a-data-structure round. Roughly four in five are rated medium, which is where most technical screens sit; 477 are hard and cluster in onsite loops. 3,033 of them open in a console where you can run your solution against the test cases in Python, Java, C++ or JavaScript. 2,712 come from Software Engineer interviews, with the rest from Machine Learning Engineer, Data Scientist and Data Engineer loops, and 404 were set as take-home projects rather than live sessions.

3.5k Questions 368 Companies08.11.2026
Showing 20 results
Role
TikTok logo
TikTok
Medium
Software Engineer

Find k-th largest element in array

You are given an unsorted array of integers nums and a positive integer k. Design an efficient algorithm to find the k-th largest element in the array...

Coding & Algorithms
5
0
44 people solved
Oct 27, 2025
Airwallex logo
Airwallex
Medium
Data ScientistSenior+ Locked

Implement bootstrap mean and variance

This question evaluates the ability to implement bootstrap resampling and compute descriptive statistics, testing competency in statistical estimation...

Coding & Algorithms
3
0
32 people solved
Oct 24, 2025
Hebbiaai logo
Hebbiaai
Medium
Software Engineer Locked

Detect Winners in Nested Tic-Tac-Toe

This question evaluates board-evaluation and pattern-detection skills, modular decomposition for reusable logic, and the ability to reason about time ...

Coding & Algorithms
0
0
15 people solved
Oct 24, 2025
Snapchat logo
Snapchat
Medium
Software Engineer Locked

Compute maximum perimeter among islands

This question evaluates a candidate's proficiency with grid traversal, connected-component identification, and perimeter computation in binary matrice...

Coding & Algorithms
4
0
46 people solved
Oct 21, 2025
Nash AI logo
Nash AI
Medium
Software Engineer Locked

Implement Minesweeper click-to-reveal expansion

This question evaluates a candidate's ability to implement grid-based data structures, state management, and flood-fill style expansion logic for Mine...

Coding & Algorithms
2
0
42 people solved
Oct 21, 2025
Meta logo
Meta
Hard
Software Engineer

Solve common array/string/linked-list tasks

You may be asked one or more of the following independent coding tasks. For each task, implement an efficient algorithm and clearly state time/space c...

Coding & Algorithms
5
0
46 people solved
Oct 21, 2025
Meta logo
Meta
Medium
Software Engineer

Design structure for top-K frequent elements

You are working with a large collection of items represented by integer IDs (e.g., product IDs, user IDs, etc.). Updates and queries arrive over time....

Coding & Algorithms
3
0
51 people solved
Oct 21, 2025
Meta logo
Meta
Medium
Software Engineer

Find shortest substring with N unique characters

You are given a string s and an integer n. Find the shortest contiguous substring of s that contains exactly n distinct characters. If there is no suc...

Coding & Algorithms
3
0
40 people solved
Oct 21, 2025
Illumio logo
Illumio
Medium
Software Engineer Locked

Count Regions in a Binary Grid

This question evaluates understanding of grid-as-graph representations, identification of connected components, and competency in algorithmic problem-...

Coding & Algorithms
1
0
19 people solved
Oct 20, 2025
Point72 logo
Point72
Easy
Data ScientistIntern

Find kth missing integer and redundant operations

You are given two independent coding tasks. Task 1: K-th missing number You are given an integer array nums (not necessarily sorted) containing distin...

Coding & Algorithms
7
0
55 people solved
Oct 20, 2025
Rippling logo
Rippling
Easy
Software Engineer AI Locked

Build an Expense Policy Rule Engine

This question evaluates implementing rule-evaluation logic, data modeling for expense records and rule representations, operator semantics, and design...

Coding & Algorithms
4
0
45 people solved
Apr 17, 2025
Square logo
Square
Hard
Software Engineer

Implement transaction network queries

Problem You are building a small in-memory library to track pairwise customer transactions and answer connectivity questions about who has transacted ...

Coding & Algorithms
5
0
60 people solved
Oct 19, 2025
TikTok logo
TikTok
Easy
Software Engineer

Find first and last index of target

You are given an integer array nums sorted in non-decreasing order and an integer target. Return a pair [left, right] where: - left is the index of th...

Coding & Algorithms
7
0
64 people solved
Oct 19, 2025
Tradedesk logo
Tradedesk
Easy
Data Scientist

Implement monotonic-array linear interpolation

Question Implement a function interpolate(array_x, array_y, x) that returns the linearly interpolated y-value for a query x-value, given paired data p...

Coding & Algorithms
2
0
57 people solved
Oct 18, 2025
Roblox logo
Roblox
Easy
Data ScientistIntern

Implement four DS coding tasks

You are completing a CodeSignal-style assessment (Python or R). Implement solutions for the following four independent questions. 1) Two-sample z-test...

Coding & Algorithms
11
0
227 people solved
Oct 18, 2025
Rippling logo
Rippling
Medium
Software Engineer

Track article votes and last three flips

Problem Design an in-memory data structure for voting on articles. Users can vote on an article with either: - Thumbs up - Thumbs down - No vote (user...

Coding & Algorithms
28
0
229 people solved
Oct 17, 2025
Rippling logo
Rippling
Medium
Software Engineer

Aggregate expenses by person, trip, and category

Problem You are given a list of expense records. Each record has: - employee_id (string) - trip_id (string) - category (string, e.g., MEAL, HOTEL, TRA...

Coding & Algorithms
20
0
314 people solved
Oct 17, 2025
Google logo
Google
Easy
Software Engineer

Find largest subset sharing a common digit

You are given a list A of two-digit integers (each from 10 to 99). Two integers are said to “share a digit” if they have at least one digit in common ...

Coding & Algorithms
4
1
49 people solved
Oct 16, 2025
Atlassian logo
Atlassian
Medium
Machine Learning Engineer Locked

Compute moving and weighted averages from a stream

This question evaluates a candidate's understanding of streaming algorithms, sliding-window statistics, and resource-constrained data structure design...

Coding & Algorithms
3
0
36 people solved
Oct 15, 2025
Atlassian logo
Atlassian
Medium
Machine Learning Engineer Locked

Assign bookings to minimum tennis courts

This question evaluates interval scheduling and resource-allocation competencies, testing algorithmic and data-structure knowledge for handling time-i...

Coding & Algorithms
3
0
35 people solved
Oct 15, 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