Interview questions
Find a company or topic. Read the sources, then practice.
Loading the question library…
Find a company or topic. Read the sources, then practice.
Loading the question library…
Showing 351–375
Implement an autoencoder from scratch using PyTorch, defining the encoder and decoder layers. Be prepared to explain the architecture, including each layer's role and any…
Companies: Kla
Last reported Jul 2026
Given a clock with two time values, calculate the minimum number of operations to move from one time to another, where the clock can move…
Companies: eBay
Last reported Jul 2026
Given an m × n grid containing a robber's starting position (*), one or more gold cells ($), open cells (O), and obstacles (X), find…
Companies: eBay
Last reported Jul 2026
Given two integer arrays of potentially different lengths, find all pairs (a, b) where a belongs to the first array and b belongs to the…
Companies: eBay
Last reported Jul 2026
Aggregate points for each distinct number (value * frequency), then choose a subset of values maximizing sum with the constraint that taking value x forbids…
Companies: Walmart, Walmart Labs
Array · Dynamic Programming · Hash Table
Last reported Jul 2026
Given a binary tree and two node values, compute the distance (number of edges) between the corresponding nodes. Key approaches include finding their lowest common…
Companies: Amazon
Last reported Jul 2026
Online interval insertions where after each [start, end) booking you must report the current maximum number of simultaneously overlapping events (the largest k such that…
Companies: Datology
Last reported Jul 2026
Create a web crawler that starts from a given URL and crawls all reachable URLs within the same domain using breadth-first search traversal. Implement multithreading…
Companies: Anthropic, Monzo, OpenAI, Opendoor +1
Last reported Jul 2026
Given a list of absolute file paths, implement a search function that accepts a search string representing either a directory or file name. The function…
Companies: Apple
Last reported Jul 2026
Given an array and integer k, find the contiguous subarray of length k that maximizes a specified metric (commonly the sum); this is an easy…
Companies: Oracle
Last reported Jul 2026
Given a queue of students with binary sandwich preferences and a stack of sandwiches (top first), students rotate to the back until someone takes the…
Companies: Salesforce
Last reported Jul 2026
Determine whether a string containing '(', ')', and '*' (where '*' can represent '(', ')', or empty) can be assigned so the parentheses are balanced…
Companies: Apple, Microsoft, Oracle
Bracket Sequences · Dynamic Programming · Greedy · Stack
Last reported Jul 2026
Design and implement basic CRUD (Create, Read, Update, Delete) operations for a REST API system. Include appropriate HTTP methods, request/response handling, and data…
Companies: Disney, DoorDash, Netflix, Speak +2
Last reported Jul 2026
Given an array of e-commerce activity tuples containing user_id, product_id, event_time, and event_type, write a function that returns the product_id with the highest number of…
Companies: Intuit
Last reported Jul 2026
Given the root of a binary tree, invert it by producing its mirror image—swap the left and right child of every node—and return the root…
Companies: Target
Last reported Jul 2026
Given up to 1e5 intervals [start,end] where you can attend an event on any integer day within its range but only one event per day…
Companies: Oracle
Last reported Jul 2026
Given a balanced string of lowercase letters and parentheses, reverse the substrings inside each matched pair from the innermost outward and return the resulting string…
Companies: Oracle
Last reported Jul 2026
Determine whether a positive integer is a perfect square without using built-in sqrt — i.e., decide if there exists an integer x such that x*x…
Companies: LinkedIn
Last reported Jul 2026
Given two people's lists of available time intervals and a required meeting duration, find the earliest time interval where both are free for at least…
Companies: Coupang, Microsoft, Uber
Last reported Jul 2026
Compute F(n) defined by F(0)=0, F(1)=1 and F(n)=F(n-1)+F(n-2); return the nth Fibonacci number for 0 ≤ n ≤ 30. The task tests handling a simple…
Companies: Bloomberg
Last reported Jul 2026
Given an integer array and a target value, find the element in the array that is closest to the target (minimum absolute difference). If two…
Companies: Walmart
Last reported Jul 2026
Convert days to +1 (hours>8) and -1 (hours<=8) and find the longest contiguous subarray whose sum is >0. This reduces to finding the farthest pair…
Companies: Chewy
Last reported Jul 2026
Given an array and a list of queries, each represented as a tuple (L, R, K), return the final state of the array after applying…
Companies: Google
Last reported Jul 2026
Given an array of integers and a target value K, find a contiguous subarray whose elements sum to K and return the subarray elements in…
Companies: Atlassian, Walmart
Last reported Jul 2026
Build a generic in-memory workflow engine that registers named steps with dependencies, validates the graph for missing steps and cycles, and executes steps in correct…
Companies: Reap
Last reported Jul 2026