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

Remove runs of length at least k

Given a string s and an integer k (k >= 2), repeatedly remove every maximal contiguous group of the same character whose length is at least k, deletin...

Coding & Algorithms
2
0
24 people solved
Aug 12, 2025
Robinhood logo
Robinhood
Medium
Software Engineer

Design a referral leaderboard with chain-based counts

Design and implement a function that generates a referral leaderboard for a platform, given two equal-length arrays rh_users and new_users representin...

Coding & Algorithms
20
0
229 people solved
Aug 12, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Maximize tokens from nested crates

You are given n crates, each either locked or unlocked. Each crate i contains: an integer tokens[i]; a list of keys that can unlock other crates; and ...

Coding & Algorithms
22
1
234 people solved
Aug 12, 2025
Pika logo
Pika
Medium
Software Engineer

Implement text formatter and sum subarray products

1) Text formatter (LC-inspired variant): Given an array of words and an integer maxWidth W >= 1, break the words into lines so that the total length o...

Coding & Algorithms
5
0
79 people solved
Aug 12, 2025
Roblox logo
Roblox
Medium
Software Engineer

Find most frequent call stack from logs

Given an array of log entries for a single-threaded program's function calls, each entry is either '->Name' (function entry) or '<-Name' (function exi...

Coding & Algorithms
75
1
687 people solved
Aug 11, 2025
ZipHQ logo
ZipHQ
Medium
Software Engineer

Find root IDs and paths

You are given a collection of string blocks, each represented as a JSON object with fields {"id": string, "parentId": string | null}. A block is a roo...

Coding & Algorithms
34
0
236 people solved
Aug 11, 2025
Sybill logo
Sybill
Medium
Software Engineer

Implement an unbiased array shuffle

Implement an unbiased array shuffle Implement an in-place function shuffle(arr) in JavaScript that returns a uniformly random permutation of the input...

Coding & Algorithms
2
0
46 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Place items into earliest fitting bins

Place items into earliest fitting bins You are given k items with sizes items[0..k-1] and n bins with initial capacities caps[0..n-1]. Process items i...

Coding & Algorithms
2
1
30 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find LCA in a BST

Find LCA in a BST Given the root of a binary search tree and two keys p and q, return the value of their lowest common ancestor (the deepest node whos...

Coding & Algorithms
2
0
36 people solved
Aug 10, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Minimize adjacent-color assignment cost

Minimize adjacent-color assignment cost You are given H linear items (e.g., houses) and an H×C cost matrix where cost[i][c] is the cost of assigning c...

Coding & Algorithms
4
0
82 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design a hierarchical locking tree

Design a hierarchical locking tree Design a LockingHierarchy data structure over a rooted tree of N nodes labeled 0..N-1, initialized with an integer ...

Coding & Algorithms
5
0
42 people solved
Aug 10, 2025
Lowe's logo
Lowe's
Medium
Software Engineer

Find longest unique substring

Find longest unique substring Given a string s, find the length and one example of the longest substring of s that contains no repeated characters. If...

Coding & Algorithms
3
0
32 people solved
Aug 10, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Solve three C++ algorithmic tasks

Solve three C++ algorithmic tasks Solve the following three C++ algorithmic tasks. For each, implement an efficient function and state time and space ...

Coding & Algorithms
4
0
56 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find odd-frequency element with O(1) space

You're given an integer array where exactly one value appears an odd number of times and all other values appear an even number of times. Implement a ...

Coding & Algorithms
4
0
35 people solved
Aug 9, 2025
Meta logo
Meta
Medium
Software Engineer

Solve array merge and tree flattening problems

Solve array merge and tree flattening problems 1) Given two sorted arrays, merge them into a single sorted array. Provide both an in-place approach (w...

Coding & Algorithms
1
0
33 people solved
Aug 9, 2025
Amazon logo
Amazon
Medium
Software Engineer

Count expressions reaching a target sum

Count expressions reaching a target sum Given an array of non-negative integers nums and an integer target T, assign either a + or − sign to each numb...

Coding & Algorithms
1
0
37 people solved
Aug 8, 2025
Verkada logo
Verkada
Medium
Software Engineer

Find users with access to all cameras

Given entities and relationships (user, owns, camera), (user, belongs_to, group), (group, owns, camera), and (group, belongs_to, group) where groups c...

Coding & Algorithms
7
0
66 people solved
Aug 8, 2025
xAI logo
xAI
Medium
Software Engineer

Weighted LRU Cache: Capacity Counted by Item Quantity

Design a variant of the classic least-recently-used (LRU) cache. In the classic version, the capacity limits the number of items stored. In this varia...

Coding & Algorithms
1
0
9 people solved
Aug 7, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Recommend movies by shared ratings

Recommend movies by shared ratings Write a function recommendations(user, ratings) that returns a list of movies to recommend to the given user based ...

Coding & Algorithms
6
0
71 people solved
Aug 7, 2025
dYdX logo
dYdX
Medium
Software Engineer

Solve shortest and label-similar paths

Solve shortest and label-similar paths Part A — Unweighted shortest path: You are given an undirected, unweighted graph with vertices labeled 0..n-1 a...

Coding & Algorithms
3
0
24 people solved
Aug 7, 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