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 121–150 of 241 results

  • OptiverHardData Scientist
    Find missing numbers in sequences

    This problem tests pattern recognition and algorithm design for identifying missing terms in a sequence that may follow arithmetic, geometric, polynomial, or linear recurrence rules.

    Coding & AlgorithmsOnline AssessmentAlgorithmsPattern RecognitionNumerical Analysis
  • OptiverMediumData Scientist
    Make Two Apple Piles Equal With Doubling Moves

    This question evaluates algorithmic problem-solving and discrete-mathematics competencies, focusing on reasoning about state transitions, invariants, and number-theoretic constraints within the Coding & Algorithms domain for data scientist roles.

    Coding & AlgorithmsTechnical Screen
  • OptiverMediumData Scientist
    Match alphanumeric patterns in a stream

    This question evaluates skills in exact and approximate alphanumeric string matching, streaming pattern lookup, noise-tolerant comparison, and performance-oriented data structures and encodings.

    Coding & AlgorithmsOnline Assessment
  • OptiverMediumData Scientist
    Minimize moves to transform floor layouts

    This question evaluates algorithm design and combinatorial optimization skills, focusing on reasoning about minimal moves, greedy heuristics, and proving optimality within the Coding & Algorithms domain for data-science technical roles.

    Coding & AlgorithmsOnline Assessment
  • OracleMediumData Scientist
    Count Closed Islands

    This problem tests your ability to navigate a 2D grid using graph traversal algorithms like DFS or BFS while identifying connected components that do not touch the grid boundaries.

    Coding & AlgorithmsTechnical ScreenDFSBFSGraph
  • OracleMediumData Scientist
    Count Interior Islands After Flooding

    This question evaluates understanding of grid-based graph traversal and connected-component detection, focusing on flood-fill logic and the treatment of boundary-connected regions in a binary grid.

    Coding & AlgorithmsTechnical Screen
  • OracleEasyData Scientist
    Count closed islands in a grid

    This problem tests your ability to navigate a 2D grid using graph traversal algorithms like DFS or BFS while handling specific boundary constraints to identify closed regions.

    Coding & AlgorithmsTechnical ScreenDFSBFSMatrix
  • OtherEasyData Scientist
    Check if a numeric string is divisible by 8

    Determine whether a very large non-negative integer given as a decimal string is divisible by 8 without converting the whole string to an integer. The key insight is that only the last three digits matter (since 1000 is a multiple of 8), giving an O(1) check; a streaming modular-remainder approach is the O(n) alternative.

    Coding & AlgorithmsTechnical Screen
  • OtherMediumData Scientist
    Implement KNN from scratch

    This question evaluates understanding of the k-Nearest Neighbors algorithm, distance metrics (Euclidean and cosine), tie-breaking with class priors, weighted voting, complexity analysis, and scalability strategies, testing competencies in algorithm implementation, model behavior, and computational trade-offs.

    Coding & AlgorithmsOnsite
  • OtherMediumData Scientist
    Implement multiplication without using the multiplication operator

    This question evaluates proficiency in bitwise arithmetic, integer overflow semantics, sign handling, and algorithmic efficiency for implementing multiplication without using multiplication or division operators.

    Coding & AlgorithmsTechnical Screen
  • OtherMediumData Scientist
    Prove reservoir sampling correctness

    This question evaluates randomized and streaming algorithm skills, including mastery of reservoir sampling, induction-based correctness proofs, probability reasoning, and complexity analysis for sampling under strict memory constraints.

    Coding & AlgorithmsOnsite
  • OtherMediumData Scientist
    Write mini-batch gradient descent

    This question evaluates understanding and implementation of optimization algorithms for machine learning, specifically mini-batch gradient descent, and measures competency in numerical optimization, algorithmic implementation, and training dynamics within the Coding & Algorithms domain for Data Scientist roles.

    Coding & AlgorithmsOnsite
  • OthersEasyData Scientist
    Answer ancestor-walk queries on a rooted tree

    This question evaluates understanding of tree data structures and ancestor-walk queries, assessing competency in traversing rooted trees, interpreting parent arrays, and designing efficient query-processing methods for large n and q.

    Coding & AlgorithmsOnline Assessment
  • PayPalHardData Scientist
    Compute Variance from a Python List

    This question evaluates understanding of basic statistical concepts and numerical computation—specifically population versus sample variance—and tests algorithmic implementation skills, edge-case handling, and complexity reasoning within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • PayPalEasyData Scientist
    Compute variance of a list in Python

    This question evaluates understanding of statistical measures and numeric computation, focusing on implementing variance calculations (population vs sample) and considerations for numerical stability.

    Coding & AlgorithmsTechnical Screen
  • PayPalMediumData Scientist
    Count Word Frequency and Print Top Three Words

    This question evaluates proficiency in basic Python programming, string/text processing, frequency counting and sorting algorithms, reflecting core competencies for data manipulation tasks.

    Coding & AlgorithmsOnsite
  • PayPalHardData Scientist
    Explain differences between Python list and tuple

    Evaluates understanding of Python data structures—specifically lists versus tuples—by probing concepts such as mutability and its implications, high-level performance and memory trade-offs, typical use cases, and hashability for use as dictionary keys.

    Coding & AlgorithmsTechnical Screen
  • PayPalMediumData Scientist
    Implement sliding-window device anomaly

    This question evaluates understanding of streaming algorithms, sliding-window state management, per-user data structures, and handling out-of-order events under strict time and space complexity constraints.

    Coding & AlgorithmsTechnical Screen
  • PerplexityMediumData Scientist
    Implement Stratified Sampling by Country

    Implement proportional stratified sampling on an in-memory list of records partitioned by a categorical key, ensuring exact sample size via the largest remainder method and reproducible selection.

    Coding & AlgorithmsTechnical Screenalgorithmsstatisticssampling
  • PinterestMediumData Scientist
    Calculate 95% Bootstrap Confidence Interval for Order Values

    This question evaluates a data scientist's competence in statistical inference using bootstrap resampling, proficiency with numerical computing for large sample operations, and attention to performance optimization.

    Coding & AlgorithmsOnsite
  • PinterestEasyData Scientist
    Compute average unique pins per user

    This question evaluates a candidate's ability to process collections and compute aggregated metrics, including per-user deduplication of items, handling of missing/null entries, numeric averaging and rounding.

    Coding & AlgorithmsTechnical Screen
  • PinterestMediumData Scientist
    Decode and Explain Ambiguity in Compression Strings

    This question evaluates parsing of compact count-value encodings, reasoning about ambiguous encodings, and combinatorial enumeration of all valid decodings.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Design Algorithm to Minimize Payments in Expense-Sharing App

    This question evaluates algorithm design and optimization skills, focusing on modeling multi-party transactions and minimizing the number of settlement operations.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Design Data Structure for Sparse Matrices Operations

    This question evaluates a candidate's ability to design efficient data structures and implement algorithms for sparse matrix storage and operations, emphasizing space-efficient representations, matrix arithmetic, and computational complexity reasoning.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Determine Pin Connections Through Common Boards

    This question evaluates graph modeling and connectivity concepts, including representing boards and pins as relationships and reasoning about reachability and minimal connection paths.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Find available reservation time slots

    This question evaluates a candidate's ability to reason about time-interval data and temporal normalization, testing competencies in interval manipulation, conflict detection, and algorithmic problem-solving for scheduling contexts.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Find list pair with maximum overlap

    This question evaluates proficiency with set operations and similarity metrics (Jaccard), scalable algorithm design and complexity analysis for large datasets, and the ability to handle streaming updates and deterministic tie-breaking.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    How to Design a Proportional Randomized Sampler?

    This question evaluates proficiency in randomized algorithms and probabilistic sampling, with emphasis on numerical precision, large-weight handling, and memory-versus-accuracy trade-offs. Commonly asked in Coding & Algorithms interviews for data-science roles, it assesses practical application ability grounded in conceptual understanding of numerical stability and relevant data-structure choices.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Implement Data Structure for Top-K Elements in Streams

    This question evaluates competency in streaming algorithms, dynamic data structures for maintaining top-K elements in real time, and scalability considerations for handling large or distributed input streams.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Implement Function to Return First n Prime Numbers

    This question evaluates algorithmic problem-solving and basic number-theory competency by requiring generation of prime numbers with attention to correctness and performance characteristics.

    Coding & AlgorithmsOnsite