Data Scientist Coding & Algorithms Interview Questions
Practice the exact questions companies are asking right now.

"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."
Evaluate piecewise linear function at x
You are given a polyline defined by n 2D points \((x_i, y_i)\). Connecting consecutive points with straight line segments forms a piecewise linear fun...
Find missing numbers in sequences
You are given several number sequences (integers and/or rational numbers). Each sequence contains exactly one missing term written as ?. For each sequ...
Solve two string DP/hash problems
Solve the following two coding questions. 1) Unique Morse Code Transformations You are given an array of strings words (lowercase English letters). Us...
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...
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(...
Maximize profit from one stock trade
Problem You are given an integer array prices where prices[i] is the price of a stock on day i. You may complete at most one transaction: choose a day...
Find maximum follow depth using recursion
You are given a directed follows relationship representing a social graph: - Each record (follower_id, followee_id) means follower_id follows followee...
Find minimum swaps to sort array with duplicates
Problem Given an integer array nums of length n that may contain duplicate values, you may perform swaps where you choose any two indices i and j and ...
Implement factorial and count trailing zeros
Answer the following coding questions in Python. 1) Implement factorial Implement a function factorial(n) that returns \(n!\) for a non-negative integ...
Explain list vs tuple in Python
Question In Python: 1. What are the key differences between a list and a tuple? 2. When would you prefer using a tuple over a list? 3. What are the pe...
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...
Return sorted values after quadratic transform
Problem You are given a sorted integer array nums (non-decreasing order) and integers a, b, c that define a quadratic function: \[ f(x) = ax^2 + bx +...
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...
Implement nested template string substitution
You are given a dictionary (map) from keys to string templates. Templates may reference other keys using placeholders of the form %KEY%. Example dicti...
Implement four DS coding tasks
You are completing a CodeSignal-style assessment (Python or R). Implement solutions for the following four independent questions. 1) Two-sample z-test...
Return the largest file size in a directory
Problem (Bash / File System) Implement a Bash function (or shell snippet) that returns the maximum file size (in bytes) under a given directory. Requi...
Match readings with latest same-city humidity
Problem You are given two time-sorted lists of sensor readings: - Temperature records: (time, city, reading) - Humidity records: (time, city, reading)...
How do you sample uniformly from an infinite stream?
Coding (Python) — Random sampling from an infinite stream You receive an unbounded/infinite stream of items (e.g., numbers or events). You cannot stor...
Compute maximum concurrent trips from intervals
You’re given n trip intervals [start, end) in seconds, where start < end, representing when a rider’s trip starts and ends in a city on a specific day...
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...