Software Engineer Coding & Algorithms Interview Questions

Practice 2,743 real Coding & Algorithms interview questions for Software Engineer roles. From companies including Meta, Amazon, Google, Uber, Microsoft.

2.7k Questions 325 Companies08.16.2026
Showing 20 results
Role
Meta logo
Meta
Medium
Software Engineer

Solve grid path and top‑k frequency

Part A — Grid Reachability with Obstacles: Given an m×n matrix of 0s and 1s where 0 indicates a passable cell and 1 indicates a blocked cell, starting...

Coding & Algorithms
4
0
31 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute nearest dashmart distances for queries

You are given an m x n grid where each cell is one of: -1 for a wall (impassable), 0 for a dashmart (a store), and INF = 2^31 - 1 for an empty room. M...

Coding & Algorithms
11
0
102 people solved
Sep 6, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Compute max profit across dated stock quotes

You are given an unsorted list of price records for multiple stocks, each record as (date, symbol, price). Dates may be repeated across different symb...

Coding & Algorithms
17
0
133 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute vertical order of a BST

Compute the vertical order traversal of a binary search tree. Define coordinates so the root is at column 0, row 0; the left child is (col−1, row+ 1) ...

Coding & Algorithms
2
0
40 people solved
Sep 6, 2025
Visa logo
Visa
Medium
Software Engineer

Maintain pair-sum counts under replacements

You are given two integer arrays A and B and a list of operations: ( 1) Query(T): return the number of pairs (i, j) such that A[i] + B[j] = T. ( 2) Re...

Coding & Algorithms
4
0
75 people solved
Sep 6, 2025
Bloomberg logo
Bloomberg
Medium
Software Engineer

Find maximum cable length by cutting

You are given N cables with integer lengths and a target K. Cut the cables into pieces of equal integer length L to produce at least K pieces; maximiz...

Coding & Algorithms
6
0
63 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Design Manhattan-distance meeting point finder

Given an m×n grid with cells marked 1 for homes and 0 otherwise, choose a single meeting cell that minimizes the sum of Manhattan distances from all h...

Coding & Algorithms
5
0
50 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Sort by squares and find k-th smallest

Given a nondecreasing sorted array of integers nums, do the following: 1) Reorder the original elements by increasing square value (equivalently, by a...

Coding & Algorithms
9
0
74 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Optimize C++ Performance with Provided Concurrency

Given a C++ codebase where threading components (threads, work queues, and synchronization primitives) are already provided, profile and optimize the ...

Coding & Algorithms
10
0
167 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Simulate stack traces from logs

Given a list of log entries describing function calls, each formatted as "<id> <event> <timestamp>" where event ∈ {START, END} and timestamps are inte...

Coding & Algorithms
51
0
472 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute Differences Between Catalog Trees

You are given two rooted catalog trees. Each node has a unique string key among its siblings and an associated value. Compare the two trees and return...

Coding & Algorithms
13
0
107 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Justify choosing JavaScript for interviews

If given a choice of language, why would you choose JavaScript for front-end interview coding? Compare trade-offs versus TypeScript or Python regardin...

Coding & Algorithms
6
0
48 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute peak concurrent drivers in 24 hours

Given delivery intervals across multiple drivers, compute the maximum number of distinct drivers simultaneously active within the last 24 hours from a...

Coding & Algorithms
19
0
202 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Maintain k-th largest in a stream

Design and implement a class KthLargest that, given an integer k and an initial list of integers, supports: ( 1) KthLargest(k, nums): constructor; ( 2...

Coding & Algorithms
7
0
75 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Compute shortest paths with blocked nodes

Given a graph with nodes and edges and a designated source node s, compute the shortest distance from s to every other node. Some nodes are inaccessib...

Coding & Algorithms
13
0
89 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute max profit from single stock trade

Given an array prices where prices[i] is the stock price on day i, compute the maximum profit achievable with at most one transaction (one buy and one...

Coding & Algorithms
1
0
23 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement hostname-restricted web crawler

Implement a single-threaded web crawler that, given a starting URL startUrl and an interface getUrls(url) that returns all hyperlinks on the page at u...

Coding & Algorithms
10
0
167 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Find the nearest city sharing axis

You are given N cities, each with a unique name and integer coordinates (x, y). For any query city, return the nearest city that shares either the sam...

Coding & Algorithms
13
0
87 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Design a single-machine LRU cache

Design an in-memory LRU cache for a single machine using a hash map and a doubly linked list to support O( 1) get and put. Explain how you handle capa...

Coding & Algorithms
9
0
76 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design a fixed-capacity circular queue

Design a fixed-capacity circular queue that supports enqueue(x), dequeue(), front(), rear(), isEmpty(), and isFull() operations in O( 1) time. Impleme...

Coding & Algorithms
1
0
28 people solved
Sep 6, 2025

Explore more Software Engineer Coding & Algorithms interview questions

Real questions from candidate reports, grouped by company, topic and role.

By company
Other categories for Software Engineer
Coding & Algorithms questions for other roles
Browse all