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

Simulate Coin Flips to Determine Fairness via Empirical Distribution

Scenario You must test whether a coin is fair by simulation. Question Write code that repeatedly simulates n coin flips, records the number of heads, ...

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

Design Algorithm for Longest Increasing Subsequence Length

Scenario Programming assessment and infrastructure panel Question Design an algorithm to return the length of the Longest Increasing Subsequence of an...

Coding & Algorithms
4
0
40 people solved
Aug 4, 2025
LendingClub logo
LendingClub
Medium
Data Scientist

Determine If Two Numbers Sum to Target

Scenario Live CodeShare Python/Java question during the same LendingClub interview assessing basic algorithmic fluency. Question Given an integer arra...

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

Find Smallest Missing Positive Integer in O(n) Time

Scenario LeetCode-style algorithm phone interview Question Implement a function that returns the smallest missing positive integer in an unsorted inte...

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

Implement Python Function for Longest Unique Substring Length

Scenario Real-time text analytics service enforcing uniqueness constraints Question Implement a Python function returning the length of the longest su...

Coding & Algorithms
3
0
26 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Determine Length of Longest Unique Substring

Scenario Online assessment: coding portion that follows the SQL questions. Question Implement a function that, given a string s, returns the length of...

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

Identify Number Pairs Adding to Target in Array

Scenario Coding round to identify all number pairs that add up to a target in an array containing duplicates. Question Given an integer array (may con...

Coding & Algorithms
26
0
84 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Solve Algorithmic Challenges in Online Coding Assessments

Scenario Online assessment requiring implementation of common algorithmic problems. Question Given an array of integers and a target, return indices o...

Coding & Algorithms
10
0
90 people solved
Aug 4, 2025
PayPal logo
PayPal
Medium
Data Scientist

Generate Bigrams Using Python List Comprehension and Zip

Scenario Live Python exercise: generate all bigrams from an input string and iteratively optimize the solution. Question Write a Python function that ...

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

Critique and Test Python Preprocessing Utilities Effectively

Scenario Code review of Python preprocessing utilities (OutlierHandler and three Imputer classes) Question Summarize, at a high level, what the Outlie...

Coding & Algorithms
9
0
65 people solved
Aug 4, 2025
Capital One logo
Capital One
Medium
Data ScientistSenior+

Explain Shell Script Line-by-Line for Data Science Workflows

Scenario Technical screening for a Principal Data Scientist: reviewing shell script and Python classes Question Explain, line by line, what the provid...

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

Identify Pirate Themes Using Similarity Score Algorithm

Scenario Engineering wants an automated way to spot custom themes that are probably just pirate themes in disguise. Question Write Python that takes t...

Coding & Algorithms
68
0
101 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Generate Synthetic Clickstream Data with Python Function

Scenario The analytics team needs to generate synthetic click-stream records to test a new reporting pipeline before real traffic arrives. Question Wr...

Coding & Algorithms
201
1
636 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Solve Search Insert Position Using Binary Search

Scenario Live coding round for an Amazon Applied Scientist position; candidate must solve LeetCode 35 (Search Insert Position) without helper librarie...

Coding & Algorithms
69
0
207 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Implement Reservoir Sampling; Analyze Time and Space Complexity

Scenario Process an unbounded stream of user IDs and maintain a uniform random sample of k users in memory. Question Implement reservoir sampling for ...

Coding & Algorithms
23
0
63 people solved
Aug 4, 2025
Upstart logo
Upstart
Medium
Data Scientist

Find Minimum Path Sum in Integer Triangle

Scenario Tech interview round 1 – dynamic programming challenge Question Given a triangle of integers, find the minimum path sum from top to bottom. A...

Coding & Algorithms
6
0
22 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Determine Maximum Path Length in Directed Acyclic Graph

Scenario A backend service represents task dependencies as a directed graph; you need to understand how deep the longest dependency chain can get. Que...

Coding & Algorithms
22
0
76 people solved
Aug 4, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Calculate 95% Bootstrap Confidence Interval for Order Values

Scenario An e-commerce firm wants a 95% confidence interval for the average order value but only has a single historical sample of order amounts. Ques...

Coding & Algorithms
27
0
45 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Implement BFS to Find Shortest Path in Graph

Scenario Social network needs to compute the shortest friend-distance between two users in an undirected graph containing millions of nodes. Question ...

Coding & Algorithms
13
0
27 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Implement and Analyze 'Merge k Sorted Lists' Algorithm

Scenario Algorithm coding challenge during the final interview round. Question Implement LeetCode 23 ‘Merge k Sorted Lists’ and explain your complexit...

Coding & Algorithms
18
0
47 people solved
Aug 4, 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