Katkat

practice a little every day, paws crossed ♡

Data Scientist Interview Questions

Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.

9403
Questions
546
Companies
11
Topics
8
Languages

Showing 181–210 of 241 results

  • SpokeoMediumData Scientist
    Solve Logic Puzzles: Algorithms and Proofs Required

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Solve Logic Puzzles: Algorithms and Proofs Required states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsOnsite
  • SquarepointMediumData Scientist
    Compute drawdown, profit, and coin change

    This question evaluates a candidate's ability to compute financial time-series metrics and apply algorithmic techniques such as array processing and optimization/dynamic programming to identify maximum drawdown and its indices.

    Coding & AlgorithmsTechnical Screen
  • SquarepointMediumData Scientist
    Count Index Triplets With an Even Product Modulo a Given Number

    From a Squarepoint technical screen: count the triplets of distinct positions in an integer array whose three values have an even product, and return the count modulo a given number. It tests efficient counting on large inputs, parity with zero and negative values, and remembering to apply the required modulo.

    Coding & AlgorithmsTechnical Screen
  • SquarepointMediumData Scientist
    Count Ways to Reach Step n With a Given Set of Step Sizes

    From a Squarepoint technical screen: count the ordered sequences of moves that climb exactly n stairs when every move uses a step size from a given set. It tests careful counting of ordered choices, targets that cannot be reached, and the interviewer's follow-up about reducing the extra space the solution uses.

    Coding & AlgorithmsTechnical Screen
  • SquarepointMediumData Scientist
    Fewest Increment-All-but-One Moves to Make Array Values Equal

    From a Squarepoint technical screen: one move adds 1 to every element of an integer array except one chosen element, and you must find the fewest moves that make all elements equal. It tests reasoning about what each move really changes, along with negative values and answers beyond the 32-bit range.

    Coding & AlgorithmsTechnical Screen
  • SquarepointMediumData Scientist
    Implement drawdown, single-trade profit, coin change

    This question evaluates a candidate's algorithmic problem-solving skills across array and time-series processing, greedy optimization, and dynamic programming, requiring implementation and complexity analysis of maximum drawdown, single-trade profit, and coin change problems within the Coding & Algorithms domain for a Data Scientist role.

    Coding & AlgorithmsTechnical Screen
  • SquarepointHardData Scientist
    Maximize profit from one or many stock trades

    This question evaluates algorithmic problem-solving skills, particularly efficient array processing and profit-optimization across single-transaction and multiple-transaction variants, along with time and space complexity analysis.

    Coding & AlgorithmsTechnical Screen
  • SquarepointMediumData Scientist
    Maximize revenue from inventory sales

    This question evaluates algorithmic problem-solving and optimization competencies focused on dynamic resource allocation, revenue maximization, and designing efficient solutions that scale with large n, m, and quantities.

    Coding & AlgorithmsOnline Assessment
  • StripeMediumData Scientist
    Implement streaming per-user reservoir sampling

    This question evaluates a candidate's competency in streaming algorithms, per-user reservoir sampling, probabilistic reasoning and proof of correctness, concurrent/distributed merging, and engineering trade-offs for memory and amortized update efficiency.

    Coding & AlgorithmsTechnical Screen
  • StripeEasyData Scientist
    Match payments to invoices by memo or amount

    This question evaluates string parsing, record linkage, and algorithmic matching skills for data reconciliation tasks, including handling messy memo text, exact amount matches, and tie-breaking by earliest due date.

    Coding & AlgorithmsTechnical Screen
  • TCSMediumData Scientist
    Find duplicates in a list efficiently

    This question evaluates a candidate's ability to design efficient algorithms for duplicate detection, occurrence counting, and preserving first-occurrence order while reasoning about time and space complexity across in-memory, in-place, and streaming data scenarios.

    Coding & AlgorithmsTechnical Screen
  • The Trade DeskEasyData Scientist
    Implement monotonic-array linear interpolation

    This question evaluates proficiency with piecewise-linear interpolation on strictly increasing (monotonic) arrays, sound handling of out-of-range queries (error, clamp, extrapolate, or None/NaN), and efficient interval search over sorted data with a target of O(log n). It also probes real-world judgment about when each out-of-range policy is appropriate and which non-bisect strategies exist.

    Coding & AlgorithmsTechnical Screen
  • ThumbtackMediumData Scientist
    Estimate Two Conditional Win Probabilities by Simulation

    This question tests practical coding ability in probabilistic simulation, requiring implementation of a Monte Carlo method to estimate conditional win probabilities under two decision strategies. It assesses a data scientist's skill in translating a classic probability scenario into working randomized code rather than relying on closed-form analysis.

    Coding & AlgorithmsTechnical Screen
  • ThumbtackMediumData Scientist
    Implement min, mean, median robustly

    This question evaluates implementation skills in basic descriptive statistics (min, mean, median), numerical stability in online aggregation methods, robust handling of edge cases like None/NaN and extreme numeric ranges, and algorithmic complexity reasoning in the Coding & Algorithms domain for a Data Scientist role.

    Coding & AlgorithmsOnsite
  • TikTokMediumData Scientist
    Analyze DFS, BFS, and A* trade-offs

    This question evaluates understanding of graph search algorithms, heuristic properties (admissibility and consistency), path optimality and time/space complexity, requiring application of BFS, uniform-cost search, A*, and DFS on a concrete weighted graph.

    Coding & AlgorithmsTechnical Screen
  • TikTokMediumData Scientist
    Compute Averages of Unique Numbers in Dictionary Lists

    This question evaluates data manipulation and aggregation skills, focusing on handling duplicate values within collections and computing numerical summaries of list data.

    Coding & AlgorithmsOnsite
  • TikTokMediumData Scientist
    Implement K-means and run two iterations

    This question evaluates understanding of k-means clustering concepts (k-means++ initialization, Lloyd iterations, and SSE) and proficiency in numerical implementation and vectorized array operations.

    Coding & AlgorithmsTechnical Screen
  • TikTokMediumData Scientist
    Implement streaming SRM detector with late events

    This question evaluates proficiency in stateful stream processing, statistical anomaly detection for sample ratio mismatch, and scalable system design concerns such as deduplication, late/out-of-order event handling, real-time aggregation, chi-square testing with Yates correction, bot-rate mitigation, sharding, and replay validation.

    Coding & AlgorithmsHR Screen
  • TikTokMediumData Scientist
    Maximize Distinct Purchases Within Budget Constraints

    This question evaluates understanding of selection and optimization under budget constraints, algorithmic efficiency, and the ability to implement correct logic for maximizing the number of distinct items purchased.

    Coding & AlgorithmsOnline Assessment
  • TikTokMediumData Scientist
    Maximize products bought under budget

    This question evaluates algorithmic problem-solving skills including sorting, prefix-sum accumulation, binary search, greedy selection, careful tie-breaking for lexicographic order, and complexity analysis.

    Coding & AlgorithmsOnline Assessment
  • TikTokMediumData Scientist
    Optimize Station Sequence for Maximum Car Output in Simulation

    This question evaluates a candidate's skills in scheduling and throughput optimization, including queue management and simulation-based performance analysis within constrained buffering and station sequencing.

    Coding & AlgorithmsOnsite
  • Two SigmaHardData Scientist
    Add two integer strings using digit-adder

    This problem tests string manipulation, modular arithmetic, and the ability to manage carry-over logic manually to perform addition on integers that exceed the capacity of standard numeric data types.

    Coding & AlgorithmsTechnical ScreenString ManipulationTwo PointersArithmetic
  • Two SigmaHardData Scientist
    Assign 2n Workers to Two Tasks to Minimize Total Time

    This question evaluates algorithmic problem-solving skills in combinatorial optimization and resource allocation, focusing on reasoning about cost differences when assigning 2n workers into two equal-sized tasks and belongs to the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • Two SigmaMediumData Scientist
    Compute Piecewise Linear Interpolation

    This question evaluates skills in algorithm design and numerical interpolation, including sorting and searching among 2D points, handling boundary cases for extrapolation, and computing linear interpolation accurately and efficiently.

    Coding & AlgorithmsOnline Assessment
  • Two SigmaHardData Scientist
    Count Distinct Island Shapes in a Binary Grid

    This question evaluates a candidate's understanding of grid-based connected components and spatial equivalence, measuring competency in representing and distinguishing island shapes regardless of their location.

    Coding & AlgorithmsOnsite
  • Two SigmaMediumData Scientist
    Evaluate Piecewise Linear Function

    This question tests the ability to efficiently search through sorted interval data and apply linear interpolation to compute the value of a continuous piecewise function at a specific input point.

    Coding & AlgorithmsOnline AssessmentBinary SearchInterpolationData Structures
  • Two SigmaMediumData Scientist
    Evaluate a Piecewise Linear Function

    This question tests the ability to efficiently search through a sorted collection of coordinates and apply linear interpolation to compute values for a continuous piecewise function.

    Coding & AlgorithmsOnline AssessmentBinary SearchInterpolationGeometry
  • Two SigmaMediumData Scientist
    Evaluate piecewise linear function at x

    This question evaluates competency in numerical interpolation and handling of piecewise linear functions, including locating the correct segment in a sorted sequence of points and managing out-of-range inputs.

    Coding & AlgorithmsOnline Assessment
  • Two SigmaHardData Scientist
    Expected Number of Good Pairs in a Randomly Weighted Complete Graph

    This question evaluates probabilistic reasoning, combinatorics, and order-statistics intuition by asking for the expected count of mutual maximum-edge neighbors (good pairs) in an edge-weighted complete graph with i.i.d. continuous weights.

    Coding & AlgorithmsTechnical Screen
  • Two SigmaEasyData Scientist
    Fill Missing Time-Series Values with Linear Interpolation (Duplicate Timestamps Allowed)

    This question evaluates a candidate's ability to perform time-series data cleaning and aggregation of duplicate timestamps, plus numerical linear interpolation and boundary value propagation, within the Coding & Algorithms domain.

    Coding & AlgorithmsOnline Assessment