X (Twitter) Machine Learning Engineer Interview Questions + Guide in 2024

X (Twitter) Machine Learning Engineer Interview Questions + Guide in 2024

Overview

X, formerly known as Twitter, is a globally recognized social media giant that offers a dynamic environment for its employees, fostering innovation and creativity. As a company that influences worldwide communication, X is constantly seeking talented individuals who can contribute to its mission of enabling public conversation.

A Machine Learning Engineer position at X is a unique and impactful role. You will have the opportunity to dive into a variety of challenging tasks including coding, system design, and implementing machine learning solutions. The interview process typically includes a coding interview, a meeting with the hiring manager, and final rounds consisting of technical and behavioral assessments.

Prepare with Interview Query to enhance your understanding of the interview structure and commonly asked X (Twitter) machine learning engineer interview questions. This guide will provide you with insights, tips, and strategies to help you navigate the interview process at X effectively. Let’s get started on your journey to joining one of the most influential tech companies!

X (Twitter) Machine Learning Engineer Interview Process

Recruiter/Hiring Manager Call Screening

If your CV happens to be among the shortlisted few, a recruiter from the X Talent Acquisition Team will make contact and verify key details like your experiences and skill level. Behavioral questions may also be a part of the screening process.

In some cases, the X Machine Learning Engineer hiring manager stays present during the screening round to answer your queries about the role and the company itself. They may also indulge in surface-level technical and behavioral discussions.

The whole recruiter call should take about 30 minutes.

Technical Virtual Interview

Successfully navigating the recruiter round will present you with an invitation for the technical screening round. Technical screening for the X Machine Learning Engineer role usually is conducted through virtual means, including video conference and screen sharing. Questions in this 1-hour long interview stage may revolve around coding, algorithmic challenges, and initial discussions about ML concepts.

Typical questions might include:

  • Coding questions about string manipulations and optimizations.
  • Algorithms involving DFS/BFS to traverse data structures.
  • Implementation of prefix trees for string operations.

Depending on the seniority of the position, more complex ML-specific coding challenges may also be a part of this stage.

Onsite Interview Rounds

Followed by a second recruiter call outlining the next stage, you’ll be invited to attend the onsite interview loop. Multiple interview rounds, varying with the role, will be conducted during your day at the X office or virtually if remote interviewing is arranged. Your technical prowess, including programming, ML modeling capabilities, and system design, will be evaluated against the finalized candidates throughout these interviews.

Typical onsite interview phases include:

  1. Coding Interview: Solve algorithmically challenging coding questions.
  2. Managerial Meeting: Interaction with the hiring manager discussing your background and aspirations.
  3. Final Interviews:
    • Two technical sections covering ML breadth, case studies, and coding tasks.
    • One non-technical section comprising behavioral questions.

Presentations can also be part of the onsite sessions, especially around take-home assignments or small and large case studies.

Never Get Stuck with an Interview Question Again

What Questions Are Asked in an X (Twitter) Machine Learning Engineer Interview?

Typically, interviews at X vary by role and team, but common machine learning engineer interviews follow a fairly standardized process across these question topics:

1. How would you measure success for Facebook Stories?

Define key performance indicators (KPIs) such as user engagement, completion rates, and user retention to measure the success of Facebook Stories.

2. How would you analyze the impact of increased push notifications on login rates using given tables?

Given events and variants tables, write a query to display a graph showing how unsubscribes affect login rates over time. Ensure all users are included in the A/B test.

3. What metrics would you use to rank X users by influence?

Given 100 X users, identify metrics such as follower count, retweet frequency, and engagement rate to quantify and rank user influence.

4. How would you validate a 1% week-on-week reduction in DAUs is not random?

To statistically validate a 1% week-on-week reduction in DAUs, structure your analysis using hypothesis testing and time series analysis to determine if the drop is significant and worth investigating.

5. How can we understand the impact of increased push notifications on user engagement?

After releasing more push notifications, analyze the increase in unsubscribes and other engagement metrics to understand how the new notification system affects overall user engagement.

6. Write a function most_tips to find the user that tipped the most.

Given two nonempty lists of user_ids and tips, write a function most_tips to find the user that tipped the most.

7. Write a query to determine the top 5 actions performed during the week of Thanksgiving and rank them.

The events table tracks every time a user performs a certain action on a platform. Write a query to determine the top 5 actions performed during the week of Thanksgiving (11/22/2020 - 11/28/2020), and rank them based on the number of times performed. The output should include the action performed and their rank in ascending order. If two actions were performed equally, they should have the same rank.

8. Write a query to get the distribution of total push notifications before a user converts.

We’re given two tables, a table of notification_deliveries and a table of users with created and purchase conversion dates. Write a query to get the distribution of total push notifications before a user converts.

9. Build a logistic regression model from scratch using gradient descent.

Build a logistic regression model from scratch with the following conditions: return the parameters of the regression, do not include an intercept term, use basic gradient descent (with Newton’s method) as your optimization method, and the log-likelihood as your loss function. Do not include a penalty term. You may use numpy and pandas but not scikit-learn.

10. Build a (k) Nearest Neighbors classification model from scratch using Euclidean distance.

Build a (k) Nearest Neighbors classification model from scratch with the following conditions: use Euclidean distance as your closeness metric, handle data frames of arbitrary many rows and columns, and if there is a tie in the class of the (k) nearest neighbors, rerun the search using (k-1) neighbors instead. You may use pandas and numpy but not scikit-learn.

11. What is the expected number of good ads rated by different types of raters?

  1. Suppose we have 100 raters each rating one ad independently. What’s the expected number of good ads?
  2. Now suppose we have 1 rater rating 100 ads. What’s the expected number of good ads?
  3. Suppose we have 1 ad, rated as bad. What’s the probability the rater was lazy?

12. How to simulate coin tosses with a given probability of heads?

Write a function that takes the number of tosses and the probability of heads as input. The function should return a list of randomly generated results (‘H’ for heads and ’T’ for tails) equal in length to the number of tosses.

13. How to calculate the sample variance of a list of integers?

Write a function that takes a list of integers as input and outputs the sample variance, rounded to 2 decimal places.

14. What is the probability of rolling at least one 3 with dice?

  1. What’s the probability of rolling at least one 3 with 2 dice?
  2. What’s the probability of rolling at least one 3 given (N) dice?

15. What is the probability of finding an item on Amazon’s website given its availability in warehouses?

Given that the probability of item X being available at warehouse A is 0.6 and at warehouse B is 0.8, what is the probability that item X would be found on Amazon’s website?

16. How would you build a job recommendation feed using LinkedIn profiles and job application data?

You have access to all user LinkedIn profiles, a list of jobs each user applied to, and answers to questions that the user filled in about their job search. Using this information, how would you build a job recommendation feed?

17. How would you implement the k-means clustering algorithm in Python from scratch?

Given a two-dimensional NumPy array data_points, number of clusters k, and initial centroids initial_centroids, implement the k-means clustering algorithm. Return a list of the cluster of each point in the original list data_points with the same order.

How to Prepare for a Machine Learning Engineer Interview at X (Twitter)

Here are a few tips on how you can effectively prepare for your machine learning engineer interview at X:

  1. Prepare for In-Depth Coding Challenges: Practice coding questions extensively, focusing on a variety of algorithms and data structure problems.
  2. Showcase Your ML Expertise: Be ready to discuss your ML projects comprehensively, including the algorithms used, challenges faced, and the outcomes.
  3. Engage Positively With Interviewers: Demonstrating your enthusiasm for the role and maintaining a positive interaction with your interviewers can make a significant difference.

FAQs

What is the average salary for a Machine Learning Engineer at X?

$148,326

Average Base Salary

$201,528

Average Total Compensation

Min: $78K
Max: $225K
Base Salary
Median: $146K
Mean (Average): $148K
Data points: 4,426
Min: $9K
Max: $500K
Total Compensation
Median: $175K
Mean (Average): $202K
Data points: 1,936

View the full Machine Learning Engineer salary guide

How can I best prepare for the coding interview at X for an ML Engineer position?

To prepare for the coding interview, you should practice solving problems on platforms like Interview Query. Focus on algorithms and data structures, as questions might involve coding problems such as string manipulation, matrix traversal, and prefix trees. Be prepared to optimize your solutions and discuss time and space complexity.

What is the company culture like at X?

X has a reputation for having a kind, professional, and supportive work environment. Employees often remark on how welcoming and collaborative the atmosphere is. It’s a place where your work can make a big impact with a relatively small team.

How are the interviewers at X?

Experiences with interviewers can vary. Many candidates report very positive interactions, noting that interviewers made efforts to put them at ease. However, there have been instances where interviewers were described as unorganized or unresponsive. Overall, it’s beneficial to approach each interview with a positive mindset and be prepared for any scenario.

Never Get Stuck with an Interview Question Again

Conclusion

The Machine Learning Engineer position at X offers a mix of opportunities and challenges, based on the mixed experiences from various candidates.

For those preparing for the X Machine Learning Engineer interviews, it’s beneficial to engage with comprehensive resources like Interview Query’s X Interview Guide, where you’ll find extensive insights and potential interview questions tailored for this role. Whether it’s decoding tweets or implementing complex algorithms from scratch, preparing rigorously can significantly boost your chances.

Good luck with your interview journey!