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
Point72 logo
Point72
Medium
Data Scientist

Find the Minimum in a Rotated Sorted Array

Find the Minimum in a Rotated Sorted Array A strictly increasing array of distinct integers has been rotated at an unknown pivot. Return its minimum v...

Coding & Algorithms
0
0
4 people solved
Dec 14, 2025
Point72 logo
Point72
Medium
Data Scientist

Maximum Profit with Unlimited Stock Transactions

Maximum Profit with Unlimited Stock Transactions Given daily stock prices, compute the maximum profit from any number of buy-and-sell transactions. Yo...

Coding & Algorithms
0
0
4 people solved
Dec 14, 2025
Coinbase logo
Coinbase
Medium
Data Scientist Locked

Implement Plus One

This question evaluates proficiency in array manipulation, elementary arithmetic operations such as carry propagation, and careful handling of edge ca...

Coding & Algorithms
3
0
64 people solved
Mar 17, 2026
Morgan Stanley logo
Morgan Stanley
Medium
Data Scientist

How do you escape the circle?

A dog runs continuously along the boundary of a circle of radius 1 at speed 4. You start at an arbitrary point strictly inside the circle and can run ...

Coding & Algorithms
3
0
49 people solved
Dec 8, 2025
Others logo
Others
Easy
Data Scientist

Return the largest file size in a directory

Problem (Bash / File System) Implement a Bash function (or shell snippet) that returns the maximum file size (in bytes) under a given directory. Requi...

Coding & Algorithms
8
0
98 people solved
Jan 17, 2026
Optiver logo
Optiver
Medium
Data Scientist

Minimize moves to transform floor layouts

You are given an initial arrangement of apartments across Floors 1–4 and a target arrangement. In one move you may reposition a single apartment to a ...

Coding & Algorithms
4
0
80 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Data Scientist

Design airport dispatch with ETA uncertainty

You control airport pickups with streaming ETAs for arriving flights and live driver locations/queues. Design an online dispatch algorithm that minimi...

Coding & Algorithms
15
0
103 people solved
Oct 13, 2025
Bytedance logo
Bytedance
Easy
Data Scientist

Implement several OA simulation problems

Reconstruct and solve the following coding problems from an online assessment. 1. Case-insensitive adjacent differences Given a string s, treat u...

Coding & Algorithms
2
0
41 people solved
Mar 5, 2026
PayPal logo
PayPal
Hard
Data Scientist

Explain differences between Python list and tuple

In Python, what are the key differences between a list and a tuple? Cover: - Mutability and implications - Performance and memory considerations (high...

Coding & Algorithms
4
0
63 people solved
Jan 2, 2026
DRW logo
DRW
Medium
Data Scientist

Solve movie ratings, array, release scheduler

Question This is a three-part coding screen used for a Data Scientist role at DRW. You will work through three independent array/sequence problems, ea...

Coding & Algorithms
5
0
72 people solved
Aug 4, 2025
Citadel logo
Citadel
Hard
Data Scientist Locked

Sort a Nearly Sorted Array

This question evaluates algorithm design and analysis skills, focusing on handling nearly-sorted arrays and reasoning about time and space complexity ...

Coding & Algorithms
6
0
67 people solved
Feb 21, 2026
LinkedIn logo
LinkedIn
Medium
Data Scientist Locked

Find index with positive suffix sums

This question evaluates array manipulation and algorithmic problem-solving skills, focusing on reasoning about cumulative (suffix) sums and time-compl...

Coding & Algorithms
4
1
97 people solved
Feb 19, 2026
Uber logo
Uber
Medium
Data ScientistNew Grad Locked

Compute CDF from a PDF Function

This question evaluates a candidate's skills in numerical integration, applied numerical methods, and probability/statistics by requiring construction...

Coding & Algorithms
3
0
42 people solved
Apr 30, 2026
TikTok logo
TikTok
Easy
Data Scientist

Implement stacks, streaming median, and upward path sum

Complete the following coding problems. State the time/space complexity and key edge cases for each. 1) MinStack Design a stack that supports: - push(...

Coding & Algorithms
10
0
118 people solved
Feb 17, 2026
Optiver logo
Optiver
Medium
Data Scientist

Devise sequence-rule detection strategy

You are given an integer sequence with 2 ≤ n ≤ 50 terms, possibly following rules such as arithmetic/geometric progressions, alternating patterns, pol...

Coding & Algorithms
8
0
84 people solved
Sep 6, 2025
Shopify logo
Shopify
Medium
Data Scientist AI

Compute Jaccard Similarity for Lists

Implement a Python function to compute the Jaccard similarity between two lists of strings. `python def jaccard_similarity(a: list[str], b: list[str])...

Coding & Algorithms
1
0
27 people solved
Apr 28, 2026
Medium
Data Scientist

Prove reservoir sampling correctness

Design an algorithm to sample k items uniformly at random from a stream of unknown and potentially massive length N, using O(k) memory and one pass. (...

Coding & Algorithms
4
0
46 people solved
Oct 13, 2025
Thumbtack logo
Thumbtack
Hard
Data Scientist

Design streaming new-vs-returning monthly metrics

Streaming design: Monthly NEW vs RETURNING request shares (event-time, with late/out-of-order and duplicates) Context You receive a high-volume event ...

Coding & Algorithms
8
0
73 people solved
Oct 13, 2025
Google logo
Google
Easy
Data Scientist

Build a Next-Word Predictor

Implement a simple next-word model over tokenized training sentences. You need to write two functions: 1. train(sentences): receives a list of tokeniz...

Coding & Algorithms
9
1
81 people solved
Feb 8, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist

Compute Piecewise Linear Interpolation

You are given an unsorted list of distinct 2D points (x_i, y_i). When the points are sorted by x_i, connecting adjacent points forms a polyline. Given...

Coding & Algorithms
1
0
11 people solved
Apr 21, 2026

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