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 2,276–2,300
Given a list/table of applicants, return the names of those who meet the Data Scientist job requirements (e.g., required skills, education, and experience) by applying…
General practice
Identify applicants for the Data Scientist role by aggregating application/assessment records and returning those who meet the required multi-criteria eligibility (e.g., pass…
General practice
Given purchase and product tables, compute all unordered category pairs (category1 < category2) and count the number of unique users who bought from both categories…
General practice
Given the list of edges of an undirected star graph, find the unique center node that is connected to every other node — equivalently, the…
General practice
Given an n×n matrix where grid[i][j]=1 iff team i is stronger than team j, return the champion — the team with no opponents stronger than…
General practice
Given a DAG of n teams where an edge u->v means u is stronger than v, find the unique team with indegree 0 (no team…
General practice
Given a directed graph or mapping of who can give a gift to whom, identify all distinct circular gift-exchange chains (simple directed cycles of length…
General practice
Given a list/table mapping cities to their states, group and aggregate the city names for each state (often returning only states with multiple cities), requiring…
General practice
Given State and City tables, return each state's name along with a comma-separated, alphabetically ordered list of its cities (use an empty string if a…
General practice
Given a directed functional graph (each node has at most one outgoing edge, possibly with cycles), find the node reachable from both node1 and node2…
General practice
Given an integer array, return the element whose absolute value is smallest (i.e., closest to zero); if there’s a tie, return the larger number.
General practice
Given positions x and y of two people and static position z, both move at the same speed toward z; determine which arrives first by…
General practice
Join jobs and companies, then count distinct users interested in at least one job at each company.
Companies: Otta / WTTJ
Design a streaming data structure that, given a target value and integer k, reports on each incoming number whether the last k elements of the…
General practice
Find employees who have at least three reviews and whose most recent three ratings (by review_date) are strictly increasing; return each employee's name and improvement…
General practice
Per patient, identify the first Positive test and the earliest Negative test that occurs after that Positive, compute recovery_time as the day difference between those…
General practice
Determine which edges in a weighted undirected graph are critical (appear in every MST) or pseudo-critical (appear in some but not all MSTs) by comparing…
General practice
Given an employee table with manager relationships and salaries, compute for each employee the total salary of themselves plus all direct and indirect subordinates; the…
General practice
Return the names of customers who either have no referee (referee_id IS NULL) or are referred by someone other than customer with id = 2…
General practice
Given customer and revenue tables, return the customers who had total revenue > 0 in the specified year. This is an easy SQL task focusing…
General practice
Given applicants' scores and each school's quota, compute for every school the cutoff score — the minimum score among admitted students — by grouping applicants…
General practice
Companies: Agoda
Breadth-First Search · Graph Theory · Tree
Compute each driver's average fuel efficiency (distance_km / fuel_consumed) separately for the first half (Jan–Jun) and second half (Jul–Dec) of the year, include only drivers…
General practice
Given a binary tree, find all roots of subtrees that occur more than once (i.e., have the same structure and node values), returning one representative…
General practice