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 91–120 of 241 results
- GsaHardData ScientistOptimize Matrix-Chain Multiplication
This problem tests your ability to solve a classic dynamic programming challenge, focusing on finding the optimal order of matrix multiplications to minimize the total number of scalar operations.
Coding & AlgorithmsTechnical ScreenDynamic ProgrammingAlgorithmsOptimization - Hudson River TradingMediumData ScientistCount Smaller Numbers with Only Zero and One in Base Four
Count the number of positive integers strictly less than n whose base-4 representation consists only of the digits 0 and 1.
Coding & AlgorithmsOnline AssessmentMathBit ManipulationDigit DP - Hudson River TradingMediumData ScientistCount inversions in a permutation
This question evaluates understanding of inversion counting in permutations, testing algorithmic problem-solving, complexity analysis, and data-structure reasoning about pairwise order relations.
Coding & AlgorithmsTechnical Screen - J.P. MorganMediumData ScientistImplement Integer Square Root
This question evaluates numerical algorithm design and integer arithmetic competence, including robustness for edge cases and overflow handling, and is categorized in the Coding & Algorithms domain.
Coding & AlgorithmsTechnical Screen - J.P. MorganMediumData ScientistImplement KNN from Scratch
This problem tests your ability to implement the K-Nearest Neighbors (KNN) algorithm from scratch, focusing on distance computation, sorting, and majority voting logic.
Coding & AlgorithmsTechnical ScreenKNNSupervised LearningAlgorithms - 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 - LendingClubMediumData ScientistDetermine If Two Numbers Sum to Target
This question evaluates a candidate's basic algorithmic fluency in array processing and the ability to reason about pairwise sums using auxiliary data structures.
Coding & AlgorithmsTechnical Screen - LinkedInMediumData ScientistFind index with positive suffix sums
This problem tests your ability to optimize array traversals using prefix or suffix sums, specifically evaluating your skill in calculating cumulative values efficiently in O(n) time.
Coding & AlgorithmsTechnical ScreenArraysSuffix SumOptimization - LinkedInEasyData ScientistHow do you sample uniformly from an infinite stream?
This question tests the implementation of Reservoir Sampling to maintain a uniform random sample of size k from a stream of unknown or infinite length.
Coding & AlgorithmsTechnical ScreenAlgorithmsProbabilityStreaming - LinkedInMediumData ScientistImplement fast sampling for weighted k-sided die
This question evaluates understanding of probabilistic algorithm design, numerical stability, and efficient data-structure implementation for constant-time sampling from categorical distributions.
Coding & AlgorithmsTechnical Screen - LinkedInMediumData ScientistImplement stream random sampling in Python
This question evaluates understanding of streaming algorithms, uniform random sampling, and probabilistic guarantees for maintaining a fixed-size sample from an unbounded data stream (reservoir-sampling concepts).
Coding & AlgorithmsTechnical Screen - LyftMediumData ScientistOptimize Driver Repositioning for Minimal Pickup Time
This question evaluates spatial algorithms and real-time optimization for ride dispatch together with interval scheduling and capacity planning competencies, covering skills in computational geometry, routing, demand forecasting, and temporal overlap reasoning.
Coding & AlgorithmsOnsite - MetaMediumData ScientistCompute binary-tree diameter via return-only DFS
This question evaluates algorithmic problem-solving with binary trees, focusing on tree traversal techniques, recursion versus iterative implementations, and analysis of time and space complexity including worst-case input shapes such as skewed trees.
Coding & AlgorithmsTechnical Screen - MetaMediumData ScientistDesign robust group size limiting for calls
This question evaluates distributed systems design, concurrency control, admission-control algorithms, and scalability under real-time and race-condition constraints.
Coding & AlgorithmsTechnical Screen - MetaMediumData ScientistOptimize Oculus Data Streaming with Bandwidth Constraints
This question evaluates a candidate's ability in algorithm design and problem decomposition for array segmentation and interval coverage, focusing on reasoning about cumulative constraints for streaming data and geometric interval intersections.
Coding & AlgorithmsOnsite - MetaMediumData ScientistOptimize Travel Costs and Generate Rotational Symmetric Numbers
This question evaluates algorithmic optimization and complexity-analysis skills by combining array-based time-dependent pricing for round-trip cost minimization with combinatorial generation of rotationally symmetric (strobogrammatic) k-digit numbers.
Coding & AlgorithmsTechnical Screen - MicrosoftHardData ScientistImplement lower_bound on unknown-size sorted array
This question evaluates ability to design efficient search algorithms for unknown-length non-decreasing arrays accessed via a limited get(i) API, emphasizing correctness proof and tight query/time complexity bounds.
Coding & AlgorithmsOnsite - MicrosoftMediumData ScientistImplement rotated array binary search with duplicates
This question evaluates algorithm design and analysis skills, focusing on binary-search variants, handling duplicates in rotated non-decreasing arrays, rotation-index reasoning, and rigorous edge-case analysis; domain: Coding & Algorithms, specifically search algorithms and array manipulation.
Coding & AlgorithmsOnsite - MicrosoftMediumData ScientistPrint Org Chart by Level
This problem tests your ability to model a tree structure from flat parent-child relations and perform a level-order traversal to format hierarchical data.
Coding & AlgorithmsTechnical ScreenTreesBFSGraphs - MicrosoftEasyData ScientistTraverse org chart level by level
This problem tests your ability to reconstruct a tree structure from a flat list of relationships and perform a breadth-first search (BFS) to group employees by their organizational depth.
Coding & AlgorithmsTechnical ScreenTreesBFSGraphs - MicrosoftEasyData ScientistWrite an average-income function
This problem tests your ability to clean and aggregate numerical data using Python, specifically handling missing values (None/NaN) and calculating a clean arithmetic mean.
Coding & AlgorithmsTechnical ScreenData CleaningPythonStatistics - Morgan StanleyEasyData ScientistCompute win probability in coin-toss game
This question evaluates understanding of probability theory and stochastic processes, focusing on win probability in an alternating coin-toss game and reasoning about pattern occurrence and stopping times in random sequences.
Coding & AlgorithmsTechnical Screen - Morgan StanleyMediumData ScientistImplement Factorial and Squares
A Morgan Stanley data scientist HR-screen live-coding warm-up: implement Python `factorial(n)` (iteratively, then explain the recursive version) and `squares(n)` returning the squares of the first n integers. Evaluates clean Python, the iteration-vs-recursion trade-off, time and space complexity analysis, input validation, and edge cases like n = 0 and negative input.
Coding & AlgorithmsHR Screen - NVIDIAHardData ScientistDesign and explain robust web APIs for ML inference
This question evaluates a candidate's proficiency in designing HTTP REST APIs for ML inference, including API endpoints, versioning, idempotency, request/response schemas, authentication/authorization, rate limiting, observability, and backward-compatibility policies, and it falls under the Coding & Algorithms domain for a data scientist role.
Coding & AlgorithmsHR Screen - NVIDIAHardData ScientistImplement CUDA-tiled matrix multiplication and explain architecture
This question evaluates a candidate's competency in CUDA GPU programming, parallel algorithms, and performance engineering for FP32 matrix multiplication, covering tiling strategies, memory hierarchy (global/shared/register), synchronization, numerical precision, and occupancy/resource analysis.
Coding & AlgorithmsHR Screen - NVIDIAHardData ScientistOptimize CUDA GEMM with tiling and coalescing
This question evaluates proficiency in GPU programming and performance optimization, assessing understanding of the CUDA execution model, memory hierarchy and bank conflicts, occupancy limits, and practical kernel design concerns for single-precision GEMM including tiling, coalescing, vectorized memory accesses and benchmarking.
Coding & AlgorithmsHR Screen - NVIDIAHardData ScientistReverse linked lists, including k-group
This question evaluates understanding of linked list manipulation including pointer operations, in-place reversal techniques, recursion and stack-depth considerations, cycle detection, and time/space complexity analysis.
Coding & AlgorithmsHR Screen - NetflixMediumData ScientistIdentify Longest Consecutive Incrementing Watch-Time Sequence
This question evaluates a candidate's ability to design and analyze efficient algorithms for detecting longest consecutive incrementing sequences in unsorted integer arrays, testing understanding of appropriate data structures and time/space complexity trade-offs.
Coding & AlgorithmsOnsite - NetflixMediumData ScientistImplement longest increasing subarray with one deletion
This question evaluates proficiency in array algorithms and algorithmic optimization, focusing on handling boundary cases, reconstructing index ranges, and meeting strict O(n) time and O(1) extra-space constraints.
Coding & AlgorithmsOnsite - OpenAIMediumData ScientistIdentify Bugs in Python Script for User Assignment
This question evaluates a candidate's ability to detect bugs and data-quality risks in a Python script, testing competencies in code review, reproducible randomization, idempotency, logging, duplicate-exposure safeguards, and safe experiment-assignment logic.
Coding & AlgorithmsOnline Assessment