Skip to main content

Data Scientist Interview Questions

Review this list of 174 Data Scientist interview questions and answers verified by hiring managers and candidates.
  • Amazon logoAsked at Amazon 
    11 answers
    +8

    "In my time at Snapp! I was in charge of communicating the product backlog to our CEO. We had a shared Jira board that he had access to and I made specifically for him. One day he saw me in the office and said he doesn’t know anything about our backlog and that’s because I failed to communicate with him. I got upset at first because of the fact that I made the dashboard exclusively for him. But I tried to ask questions to understand his point of view in depth. He then mentioned he doesn't have t"

    Ra R. - "In my time at Snapp! I was in charge of communicating the product backlog to our CEO. We had a shared Jira board that he had access to and I made specifically for him. One day he saw me in the office and said he doesn’t know anything about our backlog and that’s because I failed to communicate with him. I got upset at first because of the fact that I made the dashboard exclusively for him. But I tried to ask questions to understand his point of view in depth. He then mentioned he doesn't have t"See full answer

    Data Scientist
    Behavioral
    +9 more
  • LinkedIn logoAsked at LinkedIn 
    36 answers
    +31

    "WITH filtered_posts AS ( SELECT p.user_id, p.issuccessfulpost FROM post p WHERE p.postdate >= '2023-11-01' AND p.postdate < '2023-12-01' ), post_summary AS ( SELECT pu.user_type, COUNT(*) AS post_attempt, SUM(CASE WHEN fp.issuccessfulpost = 1 THEN 1 ELSE 0 END) AS post_success FROM filtered_posts fp JOIN postuser pu ON fp.userid = pu.user_id GROUP BY pu.user_type ) SELECT user_type, post_success, post_attempt, CAST(postsuccess AS FLOAT) / postattempt AS postsuccessrate FROM po"

    David I. - "WITH filtered_posts AS ( SELECT p.user_id, p.issuccessfulpost FROM post p WHERE p.postdate >= '2023-11-01' AND p.postdate < '2023-12-01' ), post_summary AS ( SELECT pu.user_type, COUNT(*) AS post_attempt, SUM(CASE WHEN fp.issuccessfulpost = 1 THEN 1 ELSE 0 END) AS post_success FROM filtered_posts fp JOIN postuser pu ON fp.userid = pu.user_id GROUP BY pu.user_type ) SELECT user_type, post_success, post_attempt, CAST(postsuccess AS FLOAT) / postattempt AS postsuccessrate FROM po"See full answer

    Data Scientist
    Coding
    +4 more
  • Apple logoAsked at Apple 
    36 answers
    +30

    "we can use two pointer + set like maintain i,j and also insert jth character to set like while set size is equal to our window j-i+1 then maximize our answer and increase jth pointer till last index"

    Kishor J. - "we can use two pointer + set like maintain i,j and also insert jth character to set like while set size is equal to our window j-i+1 then maximize our answer and increase jth pointer till last index"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Amazon logoAsked at Amazon 
    3 answers

    "Context - I joined a large public-facing service as a PM midway through its development. Situation - Due to the SOPs of the company the team already had a metrics framework. That included your standard DAUs, Retention and Acquisition Metrics Concern - As SOP metrics were publicly accepted, the team did not internalise what success actually means to the product they are developing, as the actual value was not being encapsulated in the framework This was evident in the show and tells as the"

    Umang S. - "Context - I joined a large public-facing service as a PM midway through its development. Situation - Due to the SOPs of the company the team already had a metrics framework. That included your standard DAUs, Retention and Acquisition Metrics Concern - As SOP metrics were publicly accepted, the team did not internalise what success actually means to the product they are developing, as the actual value was not being encapsulated in the framework This was evident in the show and tells as the"See full answer

    Data Scientist
    Analytical
    +2 more
  • Discord logoAsked at Discord 
    6 answers
    +3

    "Conflict is a GREAT opportunity to really demonstrate that you care about someone and, through effective conflict resolution, build stronger authentic relationships with the people you work with. When faced with conflict, I prioritize understanding all perspectives involved. I start by actively listening to the other parties: asking clarifying questions to pinpoint the source of the conflict, reflecting back what I'm hearing to make sure I understand them correctly, and ultimately identify"

    Zakery K. - "Conflict is a GREAT opportunity to really demonstrate that you care about someone and, through effective conflict resolution, build stronger authentic relationships with the people you work with. When faced with conflict, I prioritize understanding all perspectives involved. I start by actively listening to the other parties: asking clarifying questions to pinpoint the source of the conflict, reflecting back what I'm hearing to make sure I understand them correctly, and ultimately identify"See full answer

    Data Scientist
    Behavioral
    +3 more
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Adobe logoAsked at Adobe 
    16 answers
    Video answer for 'Given an integer array nums and an integer k, return true if nums has a subarray of at least two elements whose sum is a multiple of k.'
    +12

    "def hasgoodsubarray(nums, k): if not nums: return False prefix = 0 table = set([0]) for i in range(len(nums)): prefix += nums[i] if prefix % k in table: return True table.add(prefix % k) return False `"

    Wayne W. - "def hasgoodsubarray(nums, k): if not nums: return False prefix = 0 table = set([0]) for i in range(len(nums)): prefix += nums[i] if prefix % k in table: return True table.add(prefix % k) return False `"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • "Before proceeding, I just wanted to clarify we wanted to check for the impact of showing content from non-friends in users’ feeds, and here non-friends I would assume could be anyone, but mainly like content creators, and I am not including ads here. But I wanted to ask if there is any current logic as to what posts to show based on users' affinity to those posts, maybe basis the user engagement to Insta feed. now objective of this would be to improve the engagement of the platform, as if users"

    Dhruv S. - "Before proceeding, I just wanted to clarify we wanted to check for the impact of showing content from non-friends in users’ feeds, and here non-friends I would assume could be anyone, but mainly like content creators, and I am not including ads here. But I wanted to ask if there is any current logic as to what posts to show based on users' affinity to those posts, maybe basis the user engagement to Insta feed. now objective of this would be to improve the engagement of the platform, as if users"See full answer

    Data Scientist
    Statistics & Experimentation
  • Adobe logoAsked at Adobe 
    4 answers
    +1

    " Compare alternate houses i.e for each house starting from the third, calculate the maximum money that can be stolen up to that house by choosing between: Skipping the current house and taking the maximum money stolen up to the previous house. Robbing the current house and adding its value to the maximum money stolen up to the house two steps back. package main import ( "fmt" ) // rob function calculates the maximum money a robber can steal func maxRob(nums []int) int { ln"

    VContaineers - " Compare alternate houses i.e for each house starting from the third, calculate the maximum money that can be stolen up to that house by choosing between: Skipping the current house and taking the maximum money stolen up to the previous house. Robbing the current house and adding its value to the maximum money stolen up to the house two steps back. package main import ( "fmt" ) // rob function calculates the maximum money a robber can steal func maxRob(nums []int) int { ln"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • 47 answers
    +43

    "Here's a simpler solution: select u.username , count(p.postid) as countposts from posts as p join users as u on p.userid = u.userid where p.likes >= 100 group by 1 order by 2 desc, 1 asc limit 3 `"

    Bradley E. - "Here's a simpler solution: select u.username , count(p.postid) as countposts from posts as p join users as u on p.userid = u.userid where p.likes >= 100 group by 1 order by 2 desc, 1 asc limit 3 `"See full answer

    Data Scientist
    Coding
    +3 more
  • 4 answers
    Video answer for 'SQL Stored Procedures'
    +1

    "it is really good explanation thanks it is really good explanation thanks"

    Amney M. - "it is really good explanation thanks it is really good explanation thanks"See full answer

    Data Scientist
    Coding
    +4 more
  • 67 answers
    +61

    "SELECT id, first_name, last_name, salary FROM employees ORDER BY salary DESC LIMIT 3 `"

    Kavi S. - "SELECT id, first_name, last_name, salary FROM employees ORDER BY salary DESC LIMIT 3 `"See full answer

    Data Scientist
    Coding
    +3 more
  • Adobe logoAsked at Adobe 
    1 answer

    "Use a representative of each, e.g. sort the string and add it to the value of a hashmap> where we put all the words that belong to the same anagram together."

    Gaston B. - "Use a representative of each, e.g. sort the string and add it to the value of a hashmap> where we put all the words that belong to the same anagram together."See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Meta logoAsked at Meta 
    4 answers
    +1

    "WITH ActiveUsersYesterday AS ( SELECT DISTINCT user_id FROM user_activity WHERE activity_date = CAST(GETDATE() - 1 AS DATE) ), VideoCallUsersYesterday AS ( SELECT DISTINCT user_id FROM video_calls WHERE call_date = CAST(GETDATE() - 1 AS DATE) ) SELECT (CAST(COUNT(DISTINCT v.userid) AS FLOAT) / NULLIF(COUNT(DISTINCT a.userid), 0)) * 100 AS percentagevideocall_users FROM ActiveUsersYesterday a LEFT JOIN VideoCallUsersYesterday v ON a.userid = v.userid;"

    Bala G. - "WITH ActiveUsersYesterday AS ( SELECT DISTINCT user_id FROM user_activity WHERE activity_date = CAST(GETDATE() - 1 AS DATE) ), VideoCallUsersYesterday AS ( SELECT DISTINCT user_id FROM video_calls WHERE call_date = CAST(GETDATE() - 1 AS DATE) ) SELECT (CAST(COUNT(DISTINCT v.userid) AS FLOAT) / NULLIF(COUNT(DISTINCT a.userid), 0)) * 100 AS percentagevideocall_users FROM ActiveUsersYesterday a LEFT JOIN VideoCallUsersYesterday v ON a.userid = v.userid;"See full answer

    Data Scientist
    Coding
    +2 more
  • Adobe logoAsked at Adobe 
    34 answers
    +28

    "Two pointers sub-routine from typing import List def reverse_words(arr: List[str]) -> List[str]: size = len(arr) #reverse whole array reversesubarr(arr, 0, size-1) #reverse each word start, end = 0, 0 for i in range(size): if arr[i].isspace() or i == size-1: end = i-1 if i != size-1 else i reversesubarr(arr, start, end) start = i+1 return arr def reversesubarr(array, start, end): print(array, start,"

    Nicolás N. - "Two pointers sub-routine from typing import List def reverse_words(arr: List[str]) -> List[str]: size = len(arr) #reverse whole array reversesubarr(arr, 0, size-1) #reverse each word start, end = 0, 0 for i in range(size): if arr[i].isspace() or i == size-1: end = i-1 if i != size-1 else i reversesubarr(arr, start, end) start = i+1 return arr def reversesubarr(array, start, end): print(array, start,"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Meta logoAsked at Meta 
    4 answers
    +1

    "Before diving into the Solution, I would ask a few clarifying questions. What is the scope of the fake news What type of fake news are we focusing on - Political, Health-related, etc Are we looking at specific examples or a general category of fake news When you say impact, what do you mean by that? Is it time spent on posts, the nature of the engagement (e.g., likes, shares, comments), and the sentiment of the comments? User Demographics: what is the demographic pr"

    Bhavna S. - "Before diving into the Solution, I would ask a few clarifying questions. What is the scope of the fake news What type of fake news are we focusing on - Political, Health-related, etc Are we looking at specific examples or a general category of fake news When you say impact, what do you mean by that? Is it time spent on posts, the nature of the engagement (e.g., likes, shares, comments), and the sentiment of the comments? User Demographics: what is the demographic pr"See full answer

    Data Scientist
    Analytical
  • Tesla logoAsked at Tesla 
    35 answers
    +32

    "with empbysalary as ( select id, firstname, lastname, salary, department_id, rank() over (partition by department_id order by salary desc) as rnk from employees ) select d.name as department_name, e.id as employee_id, e.firstname, e.lastname, e.salary from empbysalary e join departments d on e.department_id=d.id where e.rnk=1 order by 1; `"

    Rishabh L. - "with empbysalary as ( select id, firstname, lastname, salary, department_id, rank() over (partition by department_id order by salary desc) as rnk from employees ) select d.name as department_name, e.id as employee_id, e.firstname, e.lastname, e.salary from empbysalary e join departments d on e.department_id=d.id where e.rnk=1 order by 1; `"See full answer

    Data Scientist
    Coding
    +4 more
  • "Product Understanding - Ads are what you see from companies as stories, posts, reels. Post are from users (connections). We have to design an experience which produces maximum engagement while generating ad revenue. Clarifying Questions - Is it specific to posts/stories/reels ? Is there an existing post to ads ratio or do we have to start from scratch? Is it specific to a device/OS? Is it specific to a region/user demographic? Assumption - Existing posts to ads ratio"

    Vishal S. - "Product Understanding - Ads are what you see from companies as stories, posts, reels. Post are from users (connections). We have to design an experience which produces maximum engagement while generating ad revenue. Clarifying Questions - Is it specific to posts/stories/reels ? Is there an existing post to ads ratio or do we have to start from scratch? Is it specific to a device/OS? Is it specific to a region/user demographic? Assumption - Existing posts to ads ratio"See full answer

    Data Scientist
    Data Analysis
  • Apple logoAsked at Apple 
    24 answers
    +21

    "function isValid(s) { const stack = []; for (let i=0; i < s.length; i++) { const char = s.charAt(i); if (['(', '{', '['].includes(char)) { stack.push(char); } else { const top = stack.pop(); if ((char === ')' && top !== '(') || (char === '}' && top !== '{') || (char === ']' && top !== '[')) { return false; } } } return stack.length === 0"

    Tiago R. - "function isValid(s) { const stack = []; for (let i=0; i < s.length; i++) { const char = s.charAt(i); if (['(', '{', '['].includes(char)) { stack.push(char); } else { const top = stack.pop(); if ((char === ')' && top !== '(') || (char === '}' && top !== '{') || (char === ']' && top !== '[')) { return false; } } } return stack.length === 0"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • 24 answers
    +21

    "The user table no longer exists as expected - I get an error that user does not contain user_id. Note that querying the table results in only user:swuoevkivrjfta select * FROM user `"

    Evan R. - "The user table no longer exists as expected - I get an error that user does not contain user_id. Note that querying the table results in only user:swuoevkivrjfta select * FROM user `"See full answer

    Data Scientist
    Coding
    +3 more
  • 28 answers
    +21

    "SELECT u.user_id, u.user_name, u.email, ROUND(AVG(CASE WHEN b.status = 'Unmatched' THEN 1.0 ELSE 0 END), 2) AS avgunmatchedbookings FROM users u LEFT JOIN bookings b ON u.userid = b.userid GROUP BY u.user_id, u.user_name, u.email; `"

    Akshay D. - "SELECT u.user_id, u.user_name, u.email, ROUND(AVG(CASE WHEN b.status = 'Unmatched' THEN 1.0 ELSE 0 END), 2) AS avgunmatchedbookings FROM users u LEFT JOIN bookings b ON u.userid = b.userid GROUP BY u.user_id, u.user_name, u.email; `"See full answer

    Data Scientist
    Coding
    +3 more
Showing 21-40 of 174