Meta (Facebook) Data Scientist Interview Questions

Review this list of 34 Meta (Facebook) data scientist interview questions and answers verified by hiring managers and candidates.
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +37

    "from typing import List def two_sum(nums: List[int], target: int) -> List[int]: prevMap = {} for i, n in enumerate(nums): diff = target - n if diff in prevMap: return [prevMap[diff], i] else: prevMap[n] = i return [] debug your code below print(two_sum([2, 7, 11, 15], 9)) `"

    Anonymous Roadrunner - "from typing import List def two_sum(nums: List[int], target: int) -> List[int]: prevMap = {} for i, n in enumerate(nums): diff = target - n if diff in prevMap: return [prevMap[diff], i] else: prevMap[n] = i return [] debug your code below print(two_sum([2, 7, 11, 15], 9)) `"See full answer

    Data Scientist
    Data Structures & Algorithms
    +5 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Data Scientist
    Analytical
    +2 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Data Scientist
    Analytical
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Video answer for 'Merge k sorted linked lists.'
    +6

    "A much better solution than the one in the article, below: It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods. shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns. My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N)) class ListNode { constructor(val = 0, next = null) { th"

    Guilherme F. - "A much better solution than the one in the article, below: It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods. shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns. My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N)) class ListNode { constructor(val = 0, next = null) { th"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "How would you increase the number of comments on groups?"

    rkk293 - "How would you increase the number of comments on groups?"See full answer

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

  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "Product Understanding - Push notifications are pop up notifications received on the device (phone, tablet etc.) sent by various Meta apps whenever a new post has been made or a new message is received Clarifying Questions - Is is specific to one device? Is it specific to one product? Is it specific to one region? Is it specific to one OS? Is this as a result of changes to algorithm/UI? Existing or a new feature? Assumptions - KPI calculation will only be for users who h"

    Vishal S. - "Product Understanding - Push notifications are pop up notifications received on the device (phone, tablet etc.) sent by various Meta apps whenever a new post has been made or a new message is received Clarifying Questions - Is is specific to one device? Is it specific to one product? Is it specific to one region? Is it specific to one OS? Is this as a result of changes to algorithm/UI? Existing or a new feature? Assumptions - KPI calculation will only be for users who h"See full answer

    Data Scientist
    Analytical
    +2 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +5

    "bool isValidBST(TreeNode* root, long min = LONGMIN, long max = LONGMAX){ if (root == NULL) return true; if (root->val val >= max) return false; return isValidBST(root->left, min, root->val) && isValidBST(root->right, root->val, max); } `"

    Alvaro R. - "bool isValidBST(TreeNode* root, long min = LONGMIN, long max = LONGMAX){ if (root == NULL) return true; if (root->val val >= max) return false; return isValidBST(root->left, min, root->val) && isValidBST(root->right, root->val, max); } `"See full answer

    Data Scientist
    Coding
    +4 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +2

    "function main(){ const v1=[2,3, 4, 10] const v2= [3,4 ,5,20, 23] return merge(v1,v2); } function merge(left, right){ const result=[]; while(left.length>0&& right.length>0){ if(left[0]0){ result=result.concat(left) } if(right.length>0){ result=result.concat(right) } return result; }"

    Samuel M. - "function main(){ const v1=[2,3, 4, 10] const v2= [3,4 ,5,20, 23] return merge(v1,v2); } function merge(left, right){ const result=[]; while(left.length>0&& right.length>0){ if(left[0]0){ result=result.concat(left) } if(right.length>0){ result=result.concat(right) } return result; }"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "Law is my passion. Traveling all over the world in 5 years"

    Moshe S. - "Law is my passion. Traveling all over the world in 5 years"See full answer

    Data Scientist
    Behavioral
    +4 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Data Scientist
    Product Strategy
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +7

    "from typing import List def traprainwater(height: List[int]) -> int: if not height: return 0 l, r = 0, len(height) - 1 leftMax, rightMax = height[l], height[r] res = 0 while l < r: if leftMax < rightMax: l += 1 leftMax = max(leftMax, height[l]) res += leftMax - height[l] else: r -= 1 rightMax = max(rightMax, height[r]) "

    Anonymous Roadrunner - "from typing import List def traprainwater(height: List[int]) -> int: if not height: return 0 l, r = 0, len(height) - 1 leftMax, rightMax = height[l], height[r] res = 0 while l < r: if leftMax < rightMax: l += 1 leftMax = max(leftMax, height[l]) res += leftMax - height[l] else: r -= 1 rightMax = max(rightMax, height[r]) "See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +2

    "Make current as root. 2 while current is not null, if p and q are less than current, go left. If p and q are greater than current, go right. else return current. return null"

    Vaibhav D. - "Make current as root. 2 while current is not null, if p and q are less than current, go left. If p and q are greater than current, go right. else return current. return null"See full answer

    Data Scientist
    Data Structures & Algorithms
    +4 more
Showing 21-34 of 34