Data Scientist Interview Questions

Review this list of 125 data scientist interview questions and answers verified by hiring managers and candidates.
  • Adobe logoAsked at Adobe 
    Video answer for 'Find the median of two sorted arrays.'
    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Video answer for 'Explain Bayes' theorem.'

    "Is it bad to get the answer a different way? Will they mark that as not knowing Bayes Theorem or just correct as it is an easier way to get the answer? The way I went is to look at what happens when the factory makes 100 light bulbs. Machine A makes 60 of which 3 are faulty, Machine B makes 40 of which 1.2 are faulty. Therefore the pool of faulty lightbulbs is 3/4.2 = 5/7 from machine A and 1.2/4.2 = 3/7 from Machine B."

    Will I. - "Is it bad to get the answer a different way? Will they mark that as not knowing Bayes Theorem or just correct as it is an easier way to get the answer? The way I went is to look at what happens when the factory makes 100 light bulbs. Machine A makes 60 of which 3 are faulty, Machine B makes 40 of which 1.2 are faulty. Therefore the pool of faulty lightbulbs is 3/4.2 = 5/7 from machine A and 1.2/4.2 = 3/7 from Machine B."See full answer

    Data Scientist
    Concept
    +2 more
  • Adobe logoAsked at Adobe 
    +6

    " function climbStairs(n) { // 4 iterations of Dynamic Programming solutions: // Step 1: Recursive: // if (n <= 2) return n // return climbStairs(n-1) + climbStairs(n-2) // Step 2: Top-down Memoization // const memo = {0:0, 1:1, 2:2} // function f(x) { // if (x in memo) return memo[x] // memo[x] = f(x-1) + f(x-2) // return memo[x] // } // return f(n) // Step 3: Bottom-up Tabulation // const tab = [0,1,2] // f"

    Matthew K. - " function climbStairs(n) { // 4 iterations of Dynamic Programming solutions: // Step 1: Recursive: // if (n <= 2) return n // return climbStairs(n-1) + climbStairs(n-2) // Step 2: Top-down Memoization // const memo = {0:0, 1:1, 2:2} // function f(x) { // if (x in memo) return memo[x] // memo[x] = f(x-1) + f(x-2) // return memo[x] // } // return f(n) // Step 3: Bottom-up Tabulation // const tab = [0,1,2] // f"See full answer

    Data Scientist
    Data Structures & Algorithms
    +3 more
  • "Goals : Determine if the TV series should be renewed If it should be renewed, how much should Netflix be willing to pay for this series Let's assume that the goal is to maximize subscriber retention and engagement while paying a reasonable amount for the licensing costs that is justified by the value added by the series. Assumptions : The show is exclusive to Netflix for a particular region (for eg. US) It has been on the platform for an year Netflix has subscriber level data around"

    Saurabh K. - "Goals : Determine if the TV series should be renewed If it should be renewed, how much should Netflix be willing to pay for this series Let's assume that the goal is to maximize subscriber retention and engagement while paying a reasonable amount for the licensing costs that is justified by the value added by the series. Assumptions : The show is exclusive to Netflix for a particular region (for eg. US) It has been on the platform for an year Netflix has subscriber level data around"See full answer

    Data Scientist
    Data Analysis
  • "I would use A/B testing to see if the new feature would be incrementally beneficial. To begin the testing, we should define what's the goal of this testing. Let's say the new feature would increase the average number of trade by X. Then randomly assign the clients to two groups, control and test group. Control group doesn't see the new feature and the test group see the new feature. We could also stratified sampling if we want to make sure cover different customer segmentation. During this desig"

    Jiin S. - "I would use A/B testing to see if the new feature would be incrementally beneficial. To begin the testing, we should define what's the goal of this testing. Let's say the new feature would increase the average number of trade by X. Then randomly assign the clients to two groups, control and test group. Control group doesn't see the new feature and the test group see the new feature. We could also stratified sampling if we want to make sure cover different customer segmentation. During this desig"See full answer

    Data Scientist
    Statistics & Experimentation
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Amazon logoAsked at Amazon 
    Video answer for 'Implement k-means clustering.'

    "i dont know"

    Dinesh K. - "i dont know"See full answer

    Data Scientist
    Coding
    +5 more
  • Amazon logoAsked at Amazon 
    +2

    "Situation: COVID has impacted everyone's lives, especially small businesses. Earlier this year, during the second lockdown in Malaysia, it was estimated that 50%-70% of small businesses have closed. It got me thinking, beyond the existing training programmes, what can my company do to support small businesses? Task: So, I took the initiative to gather our Comms and Government Affairs team, to work together and explore how we can: 1) meaningfully demonstrate our company's commitment in"

    Judy W. - "Situation: COVID has impacted everyone's lives, especially small businesses. Earlier this year, during the second lockdown in Malaysia, it was estimated that 50%-70% of small businesses have closed. It got me thinking, beyond the existing training programmes, what can my company do to support small businesses? Task: So, I took the initiative to gather our Comms and Government Affairs team, to work together and explore how we can: 1) meaningfully demonstrate our company's commitment in"See full answer

    Data Scientist
    Behavioral
    +1 more
  • Adobe logoAsked at Adobe 
    Video answer for 'Given the root of a binary tree of integers, return the maximum path sum.'

    "\# Definition for a binary tree node. class TreeNode: def init(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def maxPathSum(self, root: TreeNode) -> int: self.max_sum = float('-inf')"

    Jerry O. - "\# Definition for a binary tree node. class TreeNode: def init(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def maxPathSum(self, root: TreeNode) -> int: self.max_sum = float('-inf')"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • OpenAI logoAsked at OpenAI 
    Data Scientist
    Behavioral
    +5 more
  • Data Scientist
    Data Structures & Algorithms
    +4 more
  • Data Scientist
    Behavioral
  • Adobe logoAsked at Adobe 
    Video answer for 'Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?'
    +9

    "from typing import List def maxprofitgreedy(stock_prices: List[int]) -> int: l=0 # buying r=1 # selling max_profit=0 while rstock_prices[l]: profit=stockprices[r]-stockprices[l] maxprofit=max(maxprofit,profit) else: l=r r+=1 return max_profit debug your code below print(maxprofitgreedy([7, 1, 5, 3, 6, 4])) `"

    Prajwal M. - "from typing import List def maxprofitgreedy(stock_prices: List[int]) -> int: l=0 # buying r=1 # selling max_profit=0 while rstock_prices[l]: profit=stockprices[r]-stockprices[l] maxprofit=max(maxprofit,profit) else: l=r r+=1 return max_profit debug your code below print(maxprofitgreedy([7, 1, 5, 3, 6, 4])) `"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Data Scientist
    Analytical
    +1 more
  • Adobe logoAsked at Adobe 
    Video answer for 'Given an nxn grid of 1s and 0s, return the number of islands in the input.'
    +10

    " from typing import List def getnumberof_islands(binaryMatrix: List[List[int]]) -> int: if not binaryMatrix: return 0 rows = len(binaryMatrix) cols = len(binaryMatrix[0]) islands = 0 for r in range(rows): for c in range(cols): if binaryMatrixr == 1: islands += 1 dfs(binaryMatrix, r, c) return islands def dfs(grid, r, c): if ( r = len(grid) "

    Rick E. - " from typing import List def getnumberof_islands(binaryMatrix: List[List[int]]) -> int: if not binaryMatrix: return 0 rows = len(binaryMatrix) cols = len(binaryMatrix[0]) islands = 0 for r in range(rows): for c in range(cols): if binaryMatrixr == 1: islands += 1 dfs(binaryMatrix, r, c) return islands def dfs(grid, r, c): if ( r = len(grid) "See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Adobe logoAsked at Adobe 
    +7

    "function findPrimes(n) { if (n < 2) return []; const primes = []; for (let i=2; i <= n; i++) { const half = Math.floor(i/2); let isPrime = true; for (let prime of primes) { if (i % prime === 0) { isPrime = false; break; } } if (isPrime) { primes.push(i); } } return primes; } `"

    Tiago R. - "function findPrimes(n) { if (n < 2) return []; const primes = []; for (let i=2; i <= n; i++) { const half = Math.floor(i/2); let isPrime = true; for (let prime of primes) { if (i % prime === 0) { isPrime = false; break; } } if (isPrime) { primes.push(i); } } return primes; } `"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • "If you effectively listen and understand their point of view, then take action to address the issue quickly. Don't let too much time slip between the conflict and the resolution. If resolving the concern will take more time, communicate the current status and next steps with the stakeholder."

    Abdurhman M. - "If you effectively listen and understand their point of view, then take action to address the issue quickly. Don't let too much time slip between the conflict and the resolution. If resolving the concern will take more time, communicate the current status and next steps with the stakeholder."See full answer

    Data Scientist
    Behavioral
    +1 more
  • Data Scientist
    Statistics & Experimentation
  • "I would conduct a sample z-test because we have enough samples and the population variance is known. H1: average monthly spending per user is $50 H0: average monthly spending per user is greater $50 One-sample z-test x_bar = $85 mu = $50 s = $20 n = 100 x_bar - mu / (s / sqrt(n) = 17.5 17.5 is the z-score that we will need to associate with its corresponding p-value. However, the z-score is very high, so the p-value will be very close to zero, which is much less than the standa"

    Lucas G. - "I would conduct a sample z-test because we have enough samples and the population variance is known. H1: average monthly spending per user is $50 H0: average monthly spending per user is greater $50 One-sample z-test x_bar = $85 mu = $50 s = $20 n = 100 x_bar - mu / (s / sqrt(n) = 17.5 17.5 is the z-score that we will need to associate with its corresponding p-value. However, the z-score is very high, so the p-value will be very close to zero, which is much less than the standa"See full answer

    Data Scientist
    Statistics & Experimentation
  • Apple logoAsked at Apple 
    +9

    " class ListNode: def init(self, val=0, next=None): self.val = val self.next = next def has_cycle(head: ListNode) -> bool: pass # your code goes here if head is None: return False previousNodes = set() iter = head while iter: if iter.val in previousNodes: return True previousNodes.add(iter.val) iter = iter.next; return False debug your code below node1 = ListNode(1) node2 = ListNode(2) n"

    Cagdas A. - " class ListNode: def init(self, val=0, next=None): self.val = val self.next = next def has_cycle(head: ListNode) -> bool: pass # your code goes here if head is None: return False previousNodes = set() iter = head while iter: if iter.val in previousNodes: return True previousNodes.add(iter.val) iter = iter.next; return False debug your code below node1 = ListNode(1) node2 = ListNode(2) n"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Adobe logoAsked at Adobe 
    Data Scientist
    Data Structures & Algorithms
    +4 more
Showing 41-60 of 125