Machine Learning Engineer Interview Questions

Review this list of 215 machine learning engineer interview questions and answers verified by hiring managers and candidates.
  • JP Morgan Chase logoAsked at JP Morgan Chase 

    "It might not be a good idea to predict stock prices only based on reddit comments. You could create a signal from reddit comments that can indicate "social media interest" and feed it into a ML system (along with other features) that predicts prices. Collecting good data to train the model and evaluating it correctly are going to be huge challenges."

    Satyajit G. - "It might not be a good idea to predict stock prices only based on reddit comments. You could create a signal from reddit comments that can indicate "social media interest" and feed it into a ML system (along with other features) that predicts prices. Collecting good data to train the model and evaluating it correctly are going to be huge challenges."See full answer

    Machine Learning Engineer
    System Design
  • Adobe logoAsked at Adobe 
    +37

    "#include // Naive method to find a pair in an array with a given sum void findPair(int nums[], int n, int target) { // consider each element except the last for (int i = 0; i < n - 1; i++) { // start from the i'th element until the last element for (int j = i + 1; j < n; j++) { // if the desired sum is found, print it if (nums[i] + nums[j] == target) { printf("Pair found (%d, %d)\n", nums[i], nums[j]); return; } } } // we reach here if the pair is not found printf("Pair not found"); } "

    Gundala tarun,cse2020 V. - "#include // Naive method to find a pair in an array with a given sum void findPair(int nums[], int n, int target) { // consider each element except the last for (int i = 0; i < n - 1; i++) { // start from the i'th element until the last element for (int j = i + 1; j < n; j++) { // if the desired sum is found, print it if (nums[i] + nums[j] == target) { printf("Pair found (%d, %d)\n", nums[i], nums[j]); return; } } } // we reach here if the pair is not found printf("Pair not found"); } "See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +5 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Machine Learning Engineer
    System Design
  • Adobe logoAsked at Adobe 
    +1

    "const ops = { '+': (a, b) => a+b, '-': (a, b) => a-b, '/': (a, b) => a/b, '': (a, b) => ab, }; function calc(expr) { // Search for + or - for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if (['+', '-'].includes(char)) { return opschar), calc(expr.slice(i+1))); } } // Search for / or * for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if"

    Tiago R. - "const ops = { '+': (a, b) => a+b, '-': (a, b) => a-b, '/': (a, b) => a/b, '': (a, b) => ab, }; function calc(expr) { // Search for + or - for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if (['+', '-'].includes(char)) { return opschar), calc(expr.slice(i+1))); } } // Search for / or * for (let i=expr.length-1; i >= 0; i--) { const char = expr.charAt(i); if"See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +3 more
  • Adobe logoAsked at Adobe 
    Machine Learning Engineer
    Data Structures & Algorithms
    +4 more
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "Functional requirement's: partial search while searching for users, products any keywords in the search. additional keywords in the filter Black listed words in the search. Non functional requirements: low latency, search through 2 Billion records recent search should be cached. Design: high reads, we should have caching enabled over the primary db storages. caching cluster can be added when the search load increases. read ahead. - check in cache (periodic cache refresh), lfu, lru "

    Sandeep Y. - "Functional requirement's: partial search while searching for users, products any keywords in the search. additional keywords in the filter Black listed words in the search. Non functional requirements: low latency, search through 2 Billion records recent search should be cached. Design: high reads, we should have caching enabled over the primary db storages. caching cluster can be added when the search load increases. read ahead. - check in cache (periodic cache refresh), lfu, lru "See full answer

    Machine Learning Engineer
    System Design
  • Pinterest logoAsked at Pinterest 
    Machine Learning Engineer
    System Design
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Machine Learning Engineer
    Behavioral
    +1 more
  • Adobe logoAsked at Adobe 
    Video answer for 'Generate Parentheses'
    +5

    "function generateParentheses(n) { if (n < 1) { return []; } if (n === 1) { return ["()"]; } const combinations = new Set(); let previousCombinations = generateParentheses(n-1); for (let prev of previousCombinations) { for (let i=0; i < prev.length; i++) { combinations.add(prev.slice(0, i+1) + "()" + prev.slice(i+1)); } } return [...combinations]; } `"

    Tiago R. - "function generateParentheses(n) { if (n < 1) { return []; } if (n === 1) { return ["()"]; } const combinations = new Set(); let previousCombinations = generateParentheses(n-1); for (let prev of previousCombinations) { for (let i=0; i < prev.length; i++) { combinations.add(prev.slice(0, i+1) + "()" + prev.slice(i+1)); } } return [...combinations]; } `"See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +3 more
  • Machine Learning Engineer
    System Design
    +1 more
  • OpenAI logoAsked at OpenAI 

    "Reinforcement Learning is a type of machine learning where an agent learns to make decisions by trying out different actions and receiving rewards or penalties in return. The goal is to learn, over time, which actions yield the highest rewards. There are three core components in RL: The agent — the learner or decision-maker (e.g., an algorithm or robot), The environment — everything the agent interacts with, Actions and rewards — the agent takes actions, and the environmen"

    Constantin P. - "Reinforcement Learning is a type of machine learning where an agent learns to make decisions by trying out different actions and receiving rewards or penalties in return. The goal is to learn, over time, which actions yield the highest rewards. There are three core components in RL: The agent — the learner or decision-maker (e.g., an algorithm or robot), The environment — everything the agent interacts with, Actions and rewards — the agent takes actions, and the environmen"See full answer

    Machine Learning Engineer
    Concept
    +1 more
  • Google logoAsked at Google 

    "Yes, I need to compare the first half of the first string with the reverse order of the second half of the second string. Repeat this process to the first half of the second string and the second half of the first string."

    Anonymous Condor - "Yes, I need to compare the first half of the first string with the reverse order of the second half of the second string. Repeat this process to the first half of the second string and the second half of the first string."See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +1 more
  • "Use an index, two pointers, and a set to keep track of elements that you've seen. pseudo code follows: for i, elem in enumerate(array): if elem in set return False if i > N: set.remove(array[i-N])"

    Michael B. - "Use an index, two pointers, and a set to keep track of elements that you've seen. pseudo code follows: for i, elem in enumerate(array): if elem in set return False if i > N: set.remove(array[i-N])"See full answer

    Machine Learning Engineer
    Coding
  • Google logoAsked at Google 
    +3

    "import time class Task: def init\(self, description, interval=None): self.description = description self.interval = interval self.next_run = time.time() class SimpleTaskScheduler: def init\(self): self.tasks = [] def add_task(self, description, interval=None): self.tasks.append(Task(description, interval)) def run(self, duration=60): end_time = time.time() + duration while time.time() < end_time: curr"

    Yash N. - "import time class Task: def init\(self, description, interval=None): self.description = description self.interval = interval self.next_run = time.time() class SimpleTaskScheduler: def init\(self): self.tasks = [] def add_task(self, description, interval=None): self.tasks.append(Task(description, interval)) def run(self, duration=60): end_time = time.time() + duration while time.time() < end_time: curr"See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +1 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Machine Learning Engineer
    System Design
    +1 more
  • Adobe logoAsked at Adobe 
    Machine Learning Engineer
    Data Structures & Algorithms
    +4 more
  • Tesla logoAsked at Tesla 
    Video answer for 'Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in clockwise spiral order.'
    Machine Learning Engineer
    Data Structures & Algorithms
    +3 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 

    "Problem: Given a modified binary tree, where each node also has a pointer to it's parent, find the first common ancestor of two nodes. Answer: As it happens, the structure that we're looking at is actually a linked list (one pointer up), so the problem is identical to trying to find if two linked lists share a common node. How this works is by stacking the two chains of nodes together so they're the same length. chain1 = node1 chain2= node2 while True: chain1 = chain1.next chain2=chain"

    Michael B. - "Problem: Given a modified binary tree, where each node also has a pointer to it's parent, find the first common ancestor of two nodes. Answer: As it happens, the structure that we're looking at is actually a linked list (one pointer up), so the problem is identical to trying to find if two linked lists share a common node. How this works is by stacking the two chains of nodes together so they're the same length. chain1 = node1 chain2= node2 while True: chain1 = chain1.next chain2=chain"See full answer

    Machine Learning Engineer
    Coding
    +1 more
  • Adobe logoAsked at Adobe 
    +3

    "def buildTree(self, preorder: List[int], inorder: List[int]) -> Optional[TreeNode]: if not preorder or not inorder: return None root = TreeNode(preorder[0]) mid = inorder.index(preorder[0]) root.left = self.buildTree(preorder[1:mid+1], inorder[:mid]) root.right = self.buildTree(preorder[mid+1:], inorder[mid+1:]) return root"

    Shakshi R. - "def buildTree(self, preorder: List[int], inorder: List[int]) -> Optional[TreeNode]: if not preorder or not inorder: return None root = TreeNode(preorder[0]) mid = inorder.index(preorder[0]) root.left = self.buildTree(preorder[1:mid+1], inorder[:mid]) root.right = self.buildTree(preorder[mid+1:], inorder[mid+1:]) return root"See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +2 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Machine Learning Engineer
    System Design
Showing 81-100 of 215