READ. UNDERSTAND. PRACTICE.
Coding questions
Explore algorithm tutorials, coding and system design questions, interview experiences, and computer science study guides.
1,899 resources · Page 7 of 80
Coding questions · Meta
Calculate Total Interactions for Each Product
This question evaluates a candidate's competence in SQL-based data aggregation and relational joins for computing product-level metrics from transaction logs.
Coding questions · Meta
Calculate Total Revenue in USD Using SQL Query
This question evaluates proficiency in SQL data manipulation, focusing on joins, aggregations, and handling currency conversion across relational tables.
Coding questions · Yahoo
Calculate Total Spend and Identify Key User Metrics
This question evaluates a data scientist's proficiency in transactional data manipulation using SQL and Python, focusing on aggregation, ranking, joins, date arithmetic, and numeric rounding to produce user-level and time-series metrics.
Coding questions · Stripe
Calculate Transaction Fees
This question evaluates data-structure and numerical computation skills, including mapping composite keys to fee rates, integer fixed-point arithmetic for fee calculation, and aggregation of per-transaction and total fees.
Coding questions · Plymouth Rock Assurance Corporation
Calculate Ultimate Loss by Policy Term
This question evaluates a candidate's ability to perform sequence-aware cumulative aggregation and partitioned data manipulation, assessing competency in calculating running totals (ultimate loss) across policy-term records.
Coding questions · TikTok
Calculate User Registration Date and 7-Day Retention Rate
This question evaluates the ability to perform time-based data manipulation and cohort retention analysis using SQL/Python, including deriving registration dates, aggregating posts within time windows, and computing retention metrics.
Coding questions · Upstart
Calculate User Revenue and Session Duration in Python
This question evaluates proficiency in data manipulation and time-series event processing in Python, focusing on per-user revenue aggregation and sessionization to compute average session duration.
Coding questions · Meta
Calculate Video Call Usage Metrics by Country and Date
This question evaluates data manipulation and product-analytics skills, focusing on joining user and call datasets, aggregations for distinct-user percentages, and per-DAU duration calculations.
Coding questions · Shopify
Calculate Week-over-Week Revenue Change Using SQL
This question evaluates proficiency in SQL time-series aggregation, weekly grouping, and prior-period comparison for calculating percentage changes in revenue.
Coding questions · Meta
Calculate Weekly CTR and Campaign-Specific CTR in SQL
This question evaluates a candidate's ability to compute advertising metrics from event-level logs using SQL, specifically aggregating impressions and clicks and calculating click-through rates across and by campaign dimensions.
Coding questions · Amazon
Calculate Weekly Event Sums from Daily Counts
This question evaluates a candidate's ability to perform temporal data aggregation and date manipulation in SQL and/or Python, focusing on ISO-week boundaries, weekly grouping, and summation of event counts.
Coding questions · Amazon
Calculate Weekly, Monthly Hours Watched by Premium Users
This question evaluates a candidate's ability to perform time-based aggregation and data manipulation in SQL and Python, including grouping, filtering by subscription status, and converting minute-level metrics into hours.
Coding questions · Amazon
Calculate Weekly, Monthly Watch Hours for Paid Users
This question evaluates a data scientist's ability to perform time-based aggregations, unit conversion, filtering by user segment, and dimensional segmentation (e.g., device_type) on raw event tables.
Coding questions · Instacart
Calculate Weekly Revenue and Order Count for Standard Deliveries
This question evaluates proficiency in time-based aggregations and filtering on order-level transactional data to compute weekly revenue and order counts specifically for standard delivery orders.
Coding questions · Meta
Calculate Weekly Thread Engagement with Reactions in SQL
This question evaluates SQL and data-manipulation competency for computing time-based engagement metrics, specifically forming thread-level aggregates and measuring reaction occurrence and timing.
Coding questions · ByteDance
Campaign Efficiency Metrics and Below-Average CTR
Practice a data scientist SQL interview question that calculates campaign cost and funnel rates, handles zero denominators, and filters campaigns against an average CTR benchmark. The exercise tests PostgreSQL date arithmetic, CTE organization, NULL-safe calculations, and deterministic output.
Coding questions · DoorDash
Can two names match with ≤2 swaps?
This question evaluates string manipulation and combinatorial reasoning skills, focusing on character multisets, permutations, and the implications of a bounded number of swap operations.
Coding questions · Moloco
Can you visit all rooms and score parentheses?
The first problem evaluates graph traversal and reachability by modeling rooms and keys as an implicit graph, and it is commonly asked to assess reasoning about connectivity and exploration in graph-theoretic settings; this falls under the algorithms/graph theory domain and emphasizes practical application of traversal techniques.
Coding questions · Meta
Canonicalize an Absolute Unix-Style Path With Dot and Double-Dot Segments
Convert an absolute Unix-style file path into its canonical form by collapsing repeated slashes, dropping single-dot segments, resolving double-dot segments against the parent directory, and treating other dot sequences as ordinary names. It tests careful string parsing and edge cases such as the root directory.
Coding questions · Waymo
Character at a Position in a Run-Length Encoded String Without Decoding
Given a run-length encoded string such as B1A2E3C1, return the character at each queried position of the decoded sequence without decoding it. Runs can be very long, so the task tests prefix sums over run lengths and fast lookup per query.
Coding questions · Elevenlabs
Cheapest Shirt Color Sequence With No Color Repeated on Consecutive Days
Buy one blue, green or red shirt on each of n days without buying the same color on consecutive days, and return the color sequence with the lowest total cost. The task asks for the actual sequence rather than only the cost, testing optimization over sequences and reconstruction of the unique optimal choice.
Coding questions · Microsoft
Check a Linked List Palindrome Without Mutating It
Check whether a singly linked list is a palindrome in O(n) time and O(1) pointer space without leaving it modified. Practice finding the midpoint, reversing the second half, comparing values, and restoring every link before return.
Coding questions · Amazon
Check a Palindrome While Ignoring Case and Punctuation
Check whether a string is a palindrome after ignoring punctuation and letter case while retaining ASCII letters and digits.
Coding questions · Capital One
Check Alternating Highs and Lows Around a Circular Array
Check strict high-low alternation around a circular array, including equal neighbors, wraparound comparisons, and the two-element case.