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
Google logo
Google
Easy
Data Scientist Locked

Implement sampling, subarray scan, and percentile estimate

This multi-part problem evaluates skills in random sampling and geometric probability for uniform 2D sampling, algorithmic array processing for findin...

Coding & Algorithms
8
1
84 people solved
Feb 1, 2026
Uber logo
Uber
Medium
Data Scientist Locked

Move zeros to the front

This question evaluates array manipulation and in-place algorithm competencies, including handling space-time trade-offs and preserving relative order...

Coding & Algorithms
4
0
38 people solved
Jan 30, 2026
Sig logo
Sig
Medium
Data Scientist Locked

Compute bus-on-time and dice-sum probabilities

This question evaluates understanding of probability concepts including a continuous uniform waiting-time model for bus arrivals and discrete outcome ...

Coding & Algorithms
7
0
58 people solved
Jan 22, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist Locked

Return sorted values after quadratic transform

This question evaluates understanding of mathematical transformations and array manipulation, specifically how applying a quadratic function affects t...

Coding & Algorithms
4
0
69 people solved
Jan 22, 2026
Coinbase logo
Coinbase
Medium
Data Scientist Locked

Increment Digit Array

This question evaluates a candidate's competency in array manipulation and elementary arithmetic on digit sequences, including carry propagation and h...

Coding & Algorithms
3
0
48 people solved
Jan 21, 2026
Point72 logo
Point72
Hard
Data Scientist Locked

Implement composition and mixin utilities

This question evaluates functional programming concepts (function composition and variable-argument handling) and object-oriented serialization patter...

Coding & Algorithms
5
0
46 people solved
Jan 20, 2026
Oracle logo
Oracle
Medium
Data ScientistIntern Locked

Count Closed Islands

This question evaluates a candidate's understanding of grid-based connectivity and the ability to detect enclosed regions, testing skills in graph rep...

Coding & Algorithms
4
0
34 people solved
Jan 20, 2026
Two Sigma logo
Two Sigma
Medium
Data ScientistIntern

Linear Interpolator with Extrapolation

Linear Interpolator with Extrapolation You are given n knot points in a 2D coordinate system, where knots[i] = [x_i, y_i]. All x-coordinates are disti...

Coding & Algorithms
8
0
57 people solved
Sep 10, 2025
Waymo logo
Waymo
Easy
Data Scientist

Determine earliest collision among moving cars

You are given n cars moving over time. Each car has known initial state at time \(t=0\): - 1D case (straight road): - initial position \(x_i\) (mete...

Coding & Algorithms
32
0
244 people solved
Jan 17, 2026
Waymo logo
Waymo
Easy
Data Scientist Locked

Implement nested template string substitution

This question evaluates understanding of string processing, dependency resolution, recursive expansion, cycle detection, and efficiency techniques suc...

Coding & Algorithms
17
1
129 people solved
Jan 17, 2026
TikTok logo
TikTok
Easy
Data Scientist

Maximize watched duration under consecutive-sum limit

You have a list of videos in a feed. Video i has duration d[i] (positive integer). A user has an “attention span” limit A. You want to select a subset...

Coding & Algorithms
7
0
64 people solved
Jan 17, 2026
Two Sigma logo
Two Sigma
Hard
Data Scientist Locked

Add two integer strings using digit-adder

This question evaluates proficiency in string-based arithmetic, digit-wise addition, carry propagation, and management of arbitrarily large non-negati...

Coding & Algorithms
6
0
53 people solved
Jan 6, 2026
Akuna Capital logo
Akuna Capital
Medium
Data Scientist

Solve sliding window, graph top-k, and greedy tasks

You have three coding tasks. Task 1 — Sliding window on strings: Given a string s and an integer k, find one longest substring of s that contains at m...

Coding & Algorithms
3
0
44 people solved
Aug 12, 2025
Meta logo
Meta
Medium
Data Scientist

Optimize Travel Costs and Generate Rotational Symmetric Numbers

Scenario You are building a travel-search engine that must 1) show customers the cheapest round-trip they can book if departure and return prices vary...

Coding & Algorithms
8
0
59 people solved
Aug 4, 2025
PayPal logo
PayPal
Medium
Data Scientist

Count Word Frequency and Print Top Three Words

Scenario First-round Python coding screening Question Using only basic Python, write a function that receives a list of strings and returns a dictiona...

Coding & Algorithms
7
0
52 people solved
Aug 4, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Design Data Structure for Sparse Matrices Operations

Scenario Analytics engine stores extremely sparse numeric matrices. Question Design a data structure to store two sparse matrices and implement print(...

Coding & Algorithms
8
0
12 people solved
Jul 12, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Determine Pin Connections Through Common Boards

Scenario Pinterest boards contain many pins; need to infer relationships between pins. Question Given the membership lists of all boards, write a func...

Coding & Algorithms
19
0
58 people solved
Jul 12, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Design Algorithm to Minimize Payments in Expense-Sharing App

Scenario Expense-sharing app needs to settle debts among friends after a trip. Question Given a list of transactions (payer, payee, amount), design an...

Coding & Algorithms
28
0
96 people solved
Jul 12, 2025
TikTok logo
TikTok
Medium
Data Scientist

Optimize Station Sequence for Maximum Car Output in Simulation

Scenario The Car-Building mini-game lets you sequence chassis, engine, and paint stations with limited buffers. Question Describe a strategy to maximi...

Coding & Algorithms
10
0
34 people solved
Jul 12, 2025
Morgan Stanley logo
Morgan Stanley
Medium
Data Scientist

Compute maximum non-overlapping meetings

Assume you are given a list of meeting time intervals for a single person. Each meeting i is represented by a pair of integers [start_i, end_i], where...

Coding & Algorithms
2
0
49 people solved
Dec 8, 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