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

Simulate Radioactive Decay to Validate Analytical Solution

Scenario Same radioactive-decay problem, but now validate the analytical answer via simulation during the interview. Question Share screen and write r...

Coding & Algorithms
10
0
101 people solved
Aug 4, 2025
Walmart Labs logo
Walmart Labs
Medium
Data Scientist

Find Index Pairs of Matching Elements in Arrays

Scenario Marketing analytics team needs to find common elements between two sorted arrays of user IDs. Question Given two sorted integer arrays withou...

Coding & Algorithms
3
0
51 people solved
Aug 4, 2025
Spokeo logo
Spokeo
Medium
Data Scientist

Solve Logic Puzzles: Algorithms and Proofs Required

Solve Logic Puzzles: Algorithms and Proofs Required Scenario On-site logic/algorithm quiz with hiring manager and VP Question Solve six AMC-8–level ma...

Coding & Algorithms
4
0
33 people solved
Aug 4, 2025
Experian logo
Experian
Medium
Data Scientist

Sort and Rearrange: Efficient Algorithms for Diverse Challenges

Sort and Rearrange: Efficient Algorithms for Diverse Challenges Scenario Coding rounds and infrastructure-style algorithm questions. Question Write an...

Coding & Algorithms
2
0
44 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Design Efficient Data Structure for Median Retrieval

Scenario Senior problem-solving round assessing algorithmic thinking under time pressure. Question Design a data structure that supports inserting int...

Coding & Algorithms
2
0
27 people solved
Aug 4, 2025
Meta logo
Meta
Medium
Data Scientist

Optimize Oculus Data Streaming with Bandwidth Constraints

Scenario Algorithmic screening for Meta VR/AR teams covering Oculus data streaming and geometric optimization. Question Oculus: Given an array frame_s...

Coding & Algorithms
4
0
47 people solved
Aug 4, 2025
Shopify logo
Shopify
Medium
Data Scientist

Identify Pirate-Themed Custom Themes Using Jaccard Similarity

Scenario Engineering receives two lists and must identify custom themes that look like Pirate themes. Question a) Write a Python function that compute...

Coding & Algorithms
2
0
17 people solved
Aug 4, 2025
OpenAI logo
OpenAI
Medium
Data Scientist

Identify Bugs in Python Script for User Assignment

Scenario A simple Python script assigns users to experiment groups and triggers the free-trial offer. Question Inspect the script and list any bugs or...

Coding & Algorithms
28
0
87 people solved
Aug 4, 2025
Upstart logo
Upstart
Medium
Data Scientist

Design Algorithm for Longest Substring with K Distinct Characters

Scenario Tech interview round 2 – sliding-window algorithm Question Design an algorithm that finds the length of the longest substring containing at m...

Coding & Algorithms
19
0
32 people solved
Aug 4, 2025
Lyft logo
Lyft
Medium
Data Scientist

Optimize Driver Repositioning for Minimal Pickup Time

Scenario Design and implement algorithms for ride-sharing dispatch and capacity planning. Question Given historical rider demand density and current d...

Coding & Algorithms
55
0
104 people solved
Aug 4, 2025
Intuit logo
Intuit
Easy
Data Scientist

Implement nth Fibonacci number

Implement nth Fibonacci number Problem Write a function that returns the n-th Fibonacci number. The Fibonacci sequence is defined as: - \(F(0)=0\) - \...

Coding & Algorithms
6
0
75 people solved
Aug 1, 2025
Citadel logo
Citadel
Medium
Data Scientist

Implement two-pointer unique-pair sum search

Implement two-pointer unique-pair sum search Given a nondecreasing integer array nums and an integer target, return all unique value pairs [a, b] with...

Coding & Algorithms
8
0
83 people solved
Jul 27, 2025
C3 AI logo
C3 AI
Medium
Data Scientist

Decompress an encoded string

Decompress an encoded string Given an encoded string, return its decoded (decompressed) form. Use the following encoding rule: - A positive integer \(...

Coding & Algorithms
3
0
38 people solved
Jul 25, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Design Efficient Multi-Level Access Control System

Scenario Multi-level access control lists (country → city) must be queried quickly. Question Design and implement a permission system where each geogr...

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

Implement Data Structure for Top-K Elements in Streams

Scenario Analytics feature that must constantly report the K largest numbers seen so far. Question Implement a data structure that ingests a stream of...

Coding & Algorithms
27
0
79 people solved
Jul 12, 2025
TikTok logo
TikTok
Medium
Data Scientist

Maximize Distinct Purchases Within Budget Constraints

Scenario Given a customer budget and a list of product prices, determine the maximum number of distinct products the customer can afford. Question Des...

Coding & Algorithms
28
0
53 people solved
Jul 12, 2025
Citadel logo
Citadel
Medium
Data Scientist

Implement Infinite Fibonacci Generator Using Lazy Evaluation

Scenario Testing understanding of Python lazy evaluation and generators. Question Explain what lazy evaluation means in Python and implement a generat...

Coding & Algorithms
20
0
42 people solved
Jul 12, 2025
Google logo
Google
Medium
Data Scientist

Determine If Two Strings Are Anagrams Efficiently

Scenario Backend service needs to verify whether two user-provided strings are anagrams for text-matching features. Question Implement a Python functi...

Coding & Algorithms
12
0
49 people solved
Jul 12, 2025
Two Sigma logo
Two Sigma
Easy
Data Scientist

Median, Variance, and Linear Trend of a Daily Temperature Dataset

Median, Variance, and Linear Trend of a Daily Temperature Dataset You are given n daily temperature readings collected in New York City. The data is a...

Coding & Algorithms
0
0
7 people solved
May 13, 2025
Two Sigma logo
Two Sigma
Easy
Data Scientist

Fill Missing Time-Series Values with Linear Interpolation (Duplicate Timestamps Allowed)

Fill Missing Time-Series Values with Linear Interpolation (Duplicate Timestamps Allowed) You are given readings from a single sensor as a list of reco...

Coding & Algorithms
0
0
5 people solved
May 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