Data Scientist Coding & Algorithms Interview Questions
Practice 312 real Coding & Algorithms interview questions for Data Scientist roles. From companies including Amazon, Google, Pinterest, Uber, Capital One.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Refactor code and enforce robustness
Code Review and Refactor: Summing a CSV Column Context You are reviewing a short Python script that sums a numeric column from a CSV using pandas. You...
Reverse linked lists, including k-group
Singly Linked List Reversal — Variants and Edge Cases You are given a standard singly linked list with nodes of the form: - Node fields: value, next -...
Solve date, shopping, and circle problems
Take‑Home: Three Independent Tasks (Data/Algorithms) Implement three independent functions that will be unit‑tested separately. Provide clear error ha...
Move zeros to the front
Given an integer array nums, move all elements equal to 0 to the beginning of the array while preserving the relative order of all non-zero elements. ...
Compute rolling standard deviation in O(n)
Given an array of numbers and a window size k, compute the rolling standard deviation for every contiguous window. Design an O(n) algorithm that updat...
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...
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...
Implement bootstrap mean and variance
You are given an array of N numeric observations x[0..N-1]. Write a function that uses bootstrap resampling to estimate: 1. the mean of the original s...
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 ...
Match payments to invoices by memo or amount
You are building a small payment-to-invoice matching utility. Data You are given: - invoices: a list of invoice records with: - invoice_id (string) ...
Solve tiling, probability, and nested-radical puzzles
You are given several independent math/coding puzzles. 1) Domino tiling a 2×N board You have a 2×N rectangle and an unlimited number of 1×2 and 2×1 do...
Solve two-sum variants at scale
Base task: Given nums = [3, 1, 2, 2, 4] and target = 4, return the 0-based index pair (i, j) with i < j such that nums[i] + nums[j] = target. If multi...
Implement sqrt with Newton vs binary search
Implement numerically robust square-root routines and analyze convergence Task 1 — sqrt_newton(x, tol=1e-12) Implement a Python function that returns ...
Compute and Rank by Jaccard Similarity
Implement two functions: (1) jaccard_similarity(s1, s2) that tokenizes by splitting on any non-alphanumeric character, lowercases, treats tokens as se...
Design and secure a REST inference API
Design a REST API for Image Inference with Grad-CAM You are designing a public REST API for an image-inference service that accepts large images and r...
Compute optimal matrix-chain multiplication order
Matrix Chain Multiplication: Optimal Parenthesization and Analysis You are given five matrices to multiply: A1 (10×30), A2 (30×5), A3 (5×60), A4 (60×2...
Count Closed Islands
You are given an m x n binary grid representing terrain after flooding. - 0 = land - 1 = water A land region is an island if its land cells are connec...
Compute probability last passenger gets own seat
There are 100 passengers boarding a plane with 100 seats, numbered 1 to 100. Passenger i (for 1 ≤ i ≤ 100) has a ticket for seat i. The boarding proce...
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...
Identify Overlapping Sessions and Optimize Coverage
Scenario During the technical screen, candidates must implement interval algorithms used in fraud-detection pipelines to reconcile overlapping user ac...