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 1–30 of 70 results
- AmazonMediumData ScientistCalculate 7-Day Rolling Average for Energy Consumption
This question evaluates programming fluency in numerical data processing and algorithmic implementation for computing moving averages and handling edge cases in time-series sequences, and it applies to Data Scientist roles while falling under the Coding & Algorithms category.
Coding & AlgorithmsOnsite - AmazonMediumData ScientistDesign a Scalable, Fault-Tolerant Distributed Order System
This question evaluates system-design and algorithmic competencies, combining distributed-systems concepts — high availability, low-latency architecture, scalability levers, and fault-tolerance mechanisms — with practical binary-tree traversal and time–space complexity analysis.
Coding & AlgorithmsOnsite - AmazonMediumData ScientistImplement Reservoir Sampling; Analyze Time and Space Complexity
This question evaluates understanding of streaming randomized algorithms and probabilistic reasoning—specifically reservoir sampling—along with analysis of time and space complexity and use of hash-based structures for duplicate detection; it is in the Coding & Algorithms domain and tests both conceptual probability invariants and practical implementation skills. Such problems are commonly asked to gauge a candidate's ability to design one-pass, linear-time solutions for unbounded data streams and to reason about algorithmic correctness and resource bounds in technical interviews.
Coding & AlgorithmsOnsite - AmazonMediumData ScientistImplement and Analyze 'Merge k Sorted Lists' Algorithm
This question evaluates algorithm design skills and complexity analysis for merging multiple sorted sequences, measuring proficiency with appropriate data structures, time-space trade-offs, and correctness reasoning.
Coding & AlgorithmsOnsite - AmazonMediumData ScientistImplement list overlap and dense-ranked word frequencies
This question evaluates a data scientist's ability to implement efficient multiset intersection and streaming top-k word-frequency computations, covering duplicate-aware counting, dense-ranking, Unicode handling, and strict time/space constraints.
Coding & AlgorithmsOnsite - AmazonMediumData ScientistImplement streaming k-way merge with constraints
This question evaluates competence in streaming algorithms and resource-constrained algorithm design, specifically implementing a k-way merge over blocking, potentially unbounded integer iterators while preserving stable duplicates and reasoning about time and O(k) space complexity.
Coding & AlgorithmsOnsite - AmazonMediumData ScientistSolve two-sum variants at scale
This question evaluates array and hashing algorithms, pair-sum reasoning including duplicate handling and lexicographic minimality, streaming and external-memory algorithm design, trade-offs in time/space complexity, and extension to three-sum with deduplication.
Coding & AlgorithmsOnsite - AppleHardData ScientistCompute optimal matrix-chain multiplication order
This question evaluates dynamic programming, algorithmic analysis, and sensitivity reasoning for matrix-chain multiplication, and it belongs to the Coding & Algorithms domain; it is commonly asked because it tests understanding of optimal substructure, trade-offs in parenthesization, and correctness versus greedy heuristics.
Coding & AlgorithmsOnsite - AppleMediumData ScientistFind Smallest Missing Positive Integer in O(n) Time
This question evaluates a candidate's skill in array algorithms and in-place algorithm design, emphasizing understanding of time and space complexity and handling edge cases when identifying the smallest missing positive integer.
Coding & AlgorithmsOnsite - AppleMediumData ScientistRemove shortest subarray to sort array
This question evaluates proficiency in array algorithms, algorithmic efficiency (linear time and constant-space reasoning), and handling edge cases related to non-decreasing order, within the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - ByteDanceHardData ScientistImplement stack variants and upward path sum
A four-part ByteDance Data Scientist onsite coding question: implement an O(1) MinStack, a MaxStack with peekMax/popMax, a streaming median finder, and a binary-tree upward (node-to-ancestor) path-sum check. It tests data-structure augmentation, streaming order statistics, and prefix-sum tree reasoning.
Coding & AlgorithmsOnsite - C3 AIMediumData ScientistDecompress an encoded string
Decompress an encoded string evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsOnsite - C3 AIHardData ScientistFind the Intersection of Two Linked Chains
This problem tests the ability to detect the intersection point of two singly linked lists with constant space complexity, focusing on pointer manipulation and list traversal techniques.
Coding & AlgorithmsOnsiteLinked ListsTwo PointersAlgorithms - Capital OneMediumData ScientistAutomate Python Virtual Environment Setup on Linux Terminal
This question evaluates proficiency in shell scripting and Linux terminal automation for Python virtual-environment setup, focusing on environment management, automation, and reproducibility skills relevant to data science workflows.
Coding & AlgorithmsOnsite - Capital OneMediumData ScientistDebug and test a Python function in venv
This question evaluates understanding of Python runtime semantics (mutable default arguments, in-place list mutation during iteration), debugging and unit-testing practices, virtual environment and packaging workflows, and CI/tooling considerations.
Coding & AlgorithmsOnsite - Capital OneMediumData ScientistOptimize invites under capacity constraints
This question evaluates a candidate's competency in probabilistic expected-value optimization, algorithmic efficiency for large-scale inputs, and constrained combinatorial selection including grouped all-or-nothing decisions and cost modeling.
Coding & AlgorithmsOnsite - Capital OneMediumData ScientistRefactor code and enforce robustness
This question evaluates proficiency in code refactoring, robustness, input validation, unit testing, environment specification, and complexity analysis for Python data-processing workflows (pandas), within the Coding & Algorithms domain for Data Scientist roles.
Coding & AlgorithmsOnsite - Capital OneEasyData ScientistReview Preprocessing Code and Tests
This problem tests your ability to identify common pitfalls in data science pipelines, specifically concerning data leakage, handling missing values, and software engineering best practices for reproducibility.
Coding & AlgorithmsOnsiteData PreprocessingData LeakageCode Review - Capital OneMediumData ScientistValidate Unit-Test Coverage and Identify Missing Scenarios
This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Validate Unit-Test Coverage and Identify Missing Scenarios states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsOnsite - CitadelHardData ScientistSort a nearly sorted array
This question evaluates algorithmic problem-solving skills, specifically understanding sorting under constrained inputs and rigorous time and space complexity analysis.
Coding & AlgorithmsOnsite - CoinbaseMediumData ScientistImplement Plus One
This question evaluates array manipulation and numeric carry propagation skills, along with the ability to reason about time and space complexity when performing arithmetic on digit lists.
Coding & AlgorithmsOnsite - CoinbaseMediumData ScientistIncrement Digit Array
This question tests the ability to handle array-based arithmetic and carry propagation logic, specifically addressing edge cases like array resizing.
Coding & AlgorithmsOnsiteArraysMathSimulation - DRWMediumData ScientistSolve movie ratings, array, release scheduler
This question tests algorithmic problem-solving across three domains: greedy array optimization, tree-based data structure design, and efficient sequence merging. It evaluates practical coding ability and complexity analysis, commonly used in quantitative and data science interviews to assess how candidates identify inefficiencies and select the right data structure to improve performance.
Coding & AlgorithmsOnsite - DRWMediumData ScientistSolve three algorithmic tasks in Python
This question evaluates proficiency in dynamic programming, range-query data structures (Fenwick/segment tree), sorting and two-pointer techniques, and algorithmic complexity analysis within the Coding & Algorithms domain for Python-based implementation.
Coding & AlgorithmsOnsite - Freddie MacMediumData ScientistImplement blocked time-series cross-validation
This question evaluates competence in designing panel-aware time-series cross-validation with embargo handling, grouped blocking, deterministic splitting, scalability analysis, and adversarial unit-test design for issues like duplicate timestamps and entity migration.
Coding & AlgorithmsOnsite - GeminiMediumData ScientistDetect k events in a sliding window
This question evaluates a candidate's ability to design efficient sliding-window and streaming algorithms for time-series event data, encompassing deduplication, handling bounded out-of-order arrivals and clock skew, distinct-device counting, and meeting specified time and space complexity constraints.
Coding & AlgorithmsOnsite - GoogleMediumData ScientistImplement longest subarray summing to k
This question evaluates proficiency in array algorithms, prefix-sum reasoning, hash-based lookup patterns, and careful handling of edge cases and deterministic tie-breaking.
Coding & AlgorithmsOnsite - GoogleMediumData ScientistSimulate Coin Flips to Determine Fairness via Empirical Distribution
This question evaluates a candidate's ability to perform simulation-based hypothesis testing by implementing Monte Carlo sampling and computing an empirical two-sided p-value from observed coin-flip counts, emphasizing statistical computation and numerical accuracy.
Coding & AlgorithmsOnsite - GoogleMediumData ScientistSimulate Uniform(0,1) from random bits
This Coding & Algorithms question for a Data Scientist evaluates understanding of randomized algorithms, bit-level representation of real numbers, and probabilistic error and time-complexity analysis, situated at an algorithmic and mathematical abstraction level that requires both conceptual design and quantitative reasoning.
Coding & AlgorithmsOnsite - J.P. MorganMediumData ScientistSolve tiling, probability, and nested-radical puzzles
This problem tests your ability to derive recurrence relations for combinatorial tiling, solve infinite series limits, and calculate exact probabilities using combinations.
Coding & AlgorithmsOnsiteCombinatoricsDynamic ProgrammingProbability