Data Scientist Coding & Algorithms Interview Questions

Practice 335 real Coding & Algorithms interview questions for Data Scientist roles. From companies including Amazon, Google, Two Sigma, Pinterest, Uber.

335 Questions 80 Companies08.08.2026
Showing 20 results
Role
Bytedance logo
Bytedance
Medium
Data Scientist

Determine Whether an Integer Is a Palindrome

Determine Whether an Integer Is a Palindrome Implement is_palindrome_number(value). Return true when the base-10 digits of a non-negative integer read...

Coding & Algorithms
1
0
8 people solved
Aug 3, 2026
Jump Trading logo
Jump Trading
Medium
Data Scientist

Maintain a Fixed-Window Rolling Mean in Constant Time

Maintain a Fixed-Window Rolling Mean in Constant Time Implement rolling_means(values, window) for signed integer values, returning a double-precision ...

Coding & Algorithms
0
0
4 people solved
Aug 8, 2026
Virtu logo
Virtu
Medium
Data Scientist Locked

Maximize Points by Buying Cost-Multiplier Cards

This question evaluates a candidate's ability to reason about optimal ordering and subset selection under a multiplicative-then-subtractive scoring ru...

Coding & Algorithms
1
0
13 people solved
Jun 25, 2026
NVIDIA logo
NVIDIA
Hard
Data Scientist

Optimize CUDA GEMM with tiling and coalescing

CUDA Execution Model, Memory Hierarchy, and GEMM Kernel Design You are interviewing for a Data Scientist / GPU-software role at NVIDIA. The interviewe...

Coding & Algorithms
14
0
263 people solved
Oct 13, 2025
Two Sigma logo
Two Sigma
Easy
Data Scientist

Match readings with latest same-city humidity

Problem You are given two time-sorted lists of sensor readings: - Temperature records: (time, city, reading) - Humidity records: (time, city, reading)...

Coding & Algorithms
14
1
166 people solved
Dec 15, 2025
Shopify logo
Shopify
Medium
Data ScientistSenior+ AI Locked

Compute Theme Similarity

This question evaluates understanding of set-based similarity metrics (the Jaccard coefficient) and practical coding skills for transforming and compa...

Coding & Algorithms
4
0
44 people solved
May 23, 2026
Microsoft logo
Microsoft
Medium
Data Scientist

Compute the Product of an Array Except Self

The interview report preserved the input-output example but not every original restriction. The following is a self-contained version of the reported ...

Coding & Algorithms
8
1
60 people solved
May 4, 2026
DRW logo
DRW
Medium
Data Scientist

Solve three algorithmic tasks in Python

You are given 120 minutes to implement three independent algorithmic tasks in Python. Each task specifies the required input/output behavior, the cons...

Coding & Algorithms
15
0
129 people solved
Jul 28, 2025
Gsa logo
Gsa
Hard
Data Scientist

Optimize Matrix-Chain Multiplication

Implement minimum_matrix_chain_cost(dimensions). There are n = len(dimensions) - 1 matrices. Matrix A_i has shape dimensions[i-1] x dimensions[i] for ...

Coding & Algorithms
0
0
2 people solved
Jun 26, 2026
Thumbtack logo
Thumbtack
Medium
Data Scientist

Implement TF–IDF with sparse matrices

Implement TF–IDF from Scratch (Python + NumPy/SciPy) You are given a list of documents (plain strings). Implement a TF–IDF vectorizer from scratch — n...

Coding & Algorithms
13
0
110 people solved
Oct 13, 2025
LinkedIn logo
LinkedIn
Easy
Data Scientist Locked

How do you sample uniformly from an infinite stream?

This question evaluates understanding of streaming algorithms, randomized sampling and probability, and algorithmic space–time trade-offs involved in ...

Coding & Algorithms
13
0
129 people solved
Feb 1, 2026
LinkedIn logo
LinkedIn
Medium
Data Scientist

Implement stream random sampling in Python

You are given an unbounded stream of items that cannot be stored entirely in memory. Write Python code to maintain a uniform random sample from the st...

Coding & Algorithms
10
0
83 people solved
Oct 12, 2025
Microsoft logo
Microsoft
Easy
Data ScientistNew Grad

Compute and plot a precision–recall curve

You are given model outputs for a binary classifier: - y_true: an array of 0/1 ground-truth labels of length n. - y_score: an array of predicted score...

Coding & Algorithms
6
0
66 people solved
Nov 24, 2025
Roblox logo
Roblox
Medium
Data Scientist

Optimize assembly-line scheduling with changeovers

You are scheduling a simplified car-assembly line with two parallel stations S1 and S2. Each job must be processed on exactly one station, processing ...

Coding & Algorithms
12
0
97 people solved
Oct 13, 2025
Imc logo
Imc
Easy
Data Scientist Locked

Return all combinations that sum to target

This question evaluates combinatorial search and algorithmic problem-solving skills, focusing on recursion/backtracking, unbounded item usage, and enf...

Coding & Algorithms
4
0
60 people solved
Jan 6, 2026
Capital One logo
Capital One
Medium
Data Scientist

Explain Shell Script for Python Virtual Environment Setup

Explain Shell Script for Python Virtual Environment Setup Scenario Shell script for setting up a Python virtual environment during a tech screen Quest...

Coding & Algorithms
30
0
214 people solved
Aug 4, 2025
Capital One logo
Capital One
Medium
Data Scientist

Fix failing tests and refactor code

You're given a small Python repo. After creating and activating a clean virtual environment, installing requirements, and running "pytest -q", two tes...

Coding & Algorithms
11
0
112 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Implement a high-throughput web crawler safely

Design and code (pseudocode acceptable) a multi-threaded web crawler that favors breadth-first discovery while continuously running analysis tasks on ...

Coding & Algorithms
11
0
139 people solved
Oct 13, 2025
Shopify logo
Shopify
Easy
Data Scientist

Infer and justify non-trivial sequence patterns

Pattern Recognition: Next Terms and Missing Value Identify the rule governing each sequence or row and compute the missing value(s). Justify each answ...

Coding & Algorithms
15
1
126 people solved
Oct 13, 2025
NVIDIA logo
NVIDIA
Hard
Data Scientist

Implement CUDA-tiled matrix multiplication and explain architecture

CUDA FP32 GEMM Design Task Implement a high-performance CUDA kernel for matrix multiplication C = A · B where: - A is m×k, B is k×n, C is m×n - Data t...

Coding & Algorithms
14
0
104 people solved
Oct 13, 2025

Explore more Data Scientist Coding & Algorithms interview questions

Real questions from candidate reports, grouped by company, topic and role.

By company
Other categories for Data Scientist
Coding & Algorithms questions for other roles
Browse all