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

Implement classes in existing abstract hierarchy

You are given an existing Python codebase that defines multiple classes, including abstract base classes using abc.ABC and @abstractmethod decorators....

Coding & Algorithms
7
0
96 people solved
Jul 26, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Find and remove duplicate files

Given a directory tree that may not fit in memory, detect and optionally remove duplicate files. Define the algorithm, including how you handle very l...

Coding & Algorithms
22
0
167 people solved
Jul 26, 2025
Optiver logo
Optiver
Medium
Software Engineer

Validate a Binary Tree Built from Directed Edges

Validate a Binary Tree Built from Directed Edges You are given a list of directed edges. Each edge is a pair (parent, child) of positive-integer node ...

Coding & Algorithms
0
0
6 people solved
Jul 23, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer

Maximum Group of Pairwise Strangers in an Acquaintance Tree

You are given a social network of n people, labeled 0 through n - 1. For some pairs of people, it is known that the two people in the pair know each o...

Coding & Algorithms
0
0
6 people solved
Jul 23, 2025
DoorDash logo
DoorDash
Medium
Software EngineerSenior+

Implement a hierarchical key-value store

Implement a hierarchical key-value store Implement an in-memory hierarchical key-value store where keys are UNIX-like paths joined by '/'. The root no...

Coding & Algorithms
7
0
73 people solved
Jul 17, 2025
Meta logo
Meta
Medium
Software Engineer

Solve binary tree, grid, and heap tasks

Solve binary tree, grid, and heap tasks Answer the following independent coding tasks: 1) Range sum in a BST: Given the root of a binary search tree a...

Coding & Algorithms
3
0
31 people solved
Jul 17, 2025
IXL Learning logo
IXL Learning
Medium
Software Engineer

Solve snake game, peak search, and task scheduling

Solve snake game, peak search, and task scheduling 1) Design a grid-based snake simulation that supports move(direction) operations on a W×H board. Th...

Coding & Algorithms
4
0
74 people solved
Jul 17, 2025
TikTok logo
TikTok
Medium
Software Engineer

Explain Java DI, AOP, and transactions

Explain how dependency injection and AOP proxies are implemented in a modern Java framework such as Spring: bean lifecycle (creation, post-processing,...

Coding & Algorithms
2
0
19 people solved
Jul 17, 2025
Optiver logo
Optiver
Medium
Software Engineer

Identify OS component causing process starvation

A system with 2 CPU cores runs 5 identical processes continuously. Four processes get equal CPU time, but the fifth appears to get none. Which part of...

Coding & Algorithms
6
0
93 people solved
Jul 17, 2025
Citadel logo
Citadel
Medium
Software Engineer

Solve two DS&A optimization problems

Problem 1 — Maximize alternating-sum over four array partitions: Given an integer array arr[1..n] (1-based). Choose indices a, b, c with 1 ≤ a ≤ b ≤ c...

Coding & Algorithms
8
0
131 people solved
Jul 16, 2025
Apple logo
Apple
Medium
Software Engineer

Maximize funds with capital-gated projects

Maximize funds with capital-gated projects You start with initial funds W and may undertake at most K projects. Each project i has a required capital ...

Coding & Algorithms
4
0
59 people solved
Jul 16, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Design and implement Connect Four engine

Design and implement a Connect Four game engine. Use a default 6x7 board and two players. Provide an API with: drop(col, player) returning the row pla...

Coding & Algorithms
14
0
126 people solved
Jul 16, 2025
Optiver logo
Optiver
Medium
Software Engineer

Count nonnegative buy/sell sequences

You must perform exactly 2n unit trades starting with 0 shares and ending with 0 shares. Each trade is either a buy (+1 share) or a sell (−1 share), a...

Coding & Algorithms
18
0
131 people solved
Jul 16, 2025
Samsara logo
Samsara
Medium
Software Engineer

Implement Markdown-to-HTML parser

Implement a function that converts a plain-text string into HTML supporting only these features: ( 1) Paragraphs: two or more consecutive newline char...

Coding & Algorithms
16
0
190 people solved
Jul 16, 2025
Morgan Stanley logo
Morgan Stanley
Medium
Software Engineer

Count decodings of a digit string

Count decodings of a digit string You are given a non-empty digit string s consisting of characters '0'–'9' and a mapping where 1->'a', 2->'b', ..., 2...

Coding & Algorithms
3
0
38 people solved
Jul 16, 2025
Morgan Stanley logo
Morgan Stanley
Medium
Software Engineer

Compute minimal cost to merge numbers

Compute minimal cost to merge numbers Given an array of positive integers, you may repeatedly perform the following operation until one number remains...

Coding & Algorithms
4
0
42 people solved
Jul 16, 2025
Uber logo
Uber
Medium
Software Engineer

Simulate robot on grid with obstacles

Simulate robot on grid with obstacles A robot starts at (0, 0) on an unbounded integer grid. You are given a sequence of commands consisting of charac...

Coding & Algorithms
7
0
80 people solved
Jul 15, 2025
Uber logo
Uber
Medium
Software Engineer

Implement uniform sampling in squares

Implement uniform sampling in squares Implement a class Square representing an axis-aligned square on the 2D plane that supports sampling a uniformly ...

Coding & Algorithms
6
0
76 people solved
Jul 15, 2025
Google logo
Google
Medium
Software Engineer

Decide string transform with directional tokens and walls

Decide string transform with directional tokens and walls You are given two equal-length strings start and target of length n, each consisting only of...

Coding & Algorithms
5
0
60 people solved
Jul 15, 2025
SoFi logo
SoFi
Medium
Software Engineer

Design a key-value store with getLast

Design a key-value store with getLast Design and implement an in-memory key–value store with this API: add(key, value), get(key), remove(key), and get...

Coding & Algorithms
11
0
83 people solved
Jul 15, 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