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."
Compute Theme Similarity
Implement a small set of Python functions to detect likely pirated Shopify themes by comparing their extracted feature sets using the Jaccard similari...
Traverse an Org Chart by Level
You are given an organization's reporting structure as a flat list of employee-manager relationships. Exactly one employee is the root (the CEO) and h...
Implement Integer Square Root
Given a non-negative integer x, implement sqrt(x) and return the integer part of its square root, i.e., floor(sqrt(x)). Requirements: - Do not use a b...
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(...
Implement Plus One
Given an integer represented as an array of digits digits, where the most significant digit comes first, return the array representing the integer plu...
Compute Minimum Parentheses Additions
Given a string s consisting only of the characters '(' and ')', compute the minimum number of parentheses that must be inserted anywhere in the string...
Implement Factorial and Squares
Question In a live coding interview, write two Python functions and be ready to discuss their behavior. 1. factorial(n): Given a non-negative integer ...
Merge Two Sorted Lists
You are given the heads of two singly linked lists, each already sorted in non-decreasing order. Merge them into one sorted linked list and return the...
Solve a Skyscraper puzzle efficiently
Design and implement a solver for the Skyscraper logic puzzle on an $N \times N$ grid, where $3 \le N \le 7$. The board is a grid of building heights....
Sort a nearly sorted array
Given an array of length \(n\) in which every element is at most \(k\) positions away from its location in the fully sorted order, design an algorithm...
Merge two sorted lists
Given two sorted lists (arrays) of integers A and B in non-decreasing order, merge them into a single sorted list. Requirements - Output must be sorte...
Count closed islands in a grid
Problem You are given an m x n 2D grid representing a map after flooding: - 0 = water - 1 = land An island is a maximal 4-directionally connected comp...
Optimize CUDA GEMM with tiling and coalescing
CUDA Execution Model, Memory Hierarchy, and GEMM Kernel Design You are interviewing for a Data Scientist / GPU-software role at NVIDIA. The interviewe...
Implement FizzBuzz
Implement the classic FizzBuzz problem. Given a positive integer n, return the sequence from 1 to n as strings with the following rules: - If a number...
Implement Safe Average Function
Write a Python function average(values) that returns the arithmetic mean of a list of numbers. Requirements: - If values is empty, return 0. - The inp...
Find duplicates in a list efficiently
Given a Python list that can contain integers (possibly negative) and may be very large, write code and explain approaches to find all values that app...
Determine if tree has path sum
Problem Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values a...
Implement Buffer Parsers and Generic Map Class
In C++, complete the following two independent implementation tasks. 1. Sequential buffer reader You are given a raw byte buffer and a current poin...
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...
Compute Score Difference in Reversing Array Game
You are given an array of integers. Repeatedly remove the first element of the current array until it becomes empty. Scoring rules: - If the removed n...