TuSimple Interview Questions

TuSimple Interview Guides

Click or hover over a slice to explore questions for that topic.
Data Structures & Algorithms
(78)
Machine Learning
(39)
Probability
(30)
SQL
(28)
Product Sense & Metrics
(25)

TuSimple Interview Questions

Practice for the TuSimple interview with these recently asked interview questions.

QuestionTopicDifficulty
Machine Learning
Hard

Implement the k-means clustering algorithm in python from scratch, given the following:

  • A two-dimensional NumPy array data_points that is an arbitrary number of data points (rows) n and an arbitrary number of columns m.
  • Number of k clusters k.
  • The initial centroids value of the data points at each cluster initial_centroids.

Return a list of the cluster of each point in the original list data_points with the same order (as a integer).

Example

before clustering

After clustering the points with two clusters, the points will be clustered as follows.

after clustering

Note: There could be an infinite number of separating lines in this example.

Example


#Input
data_points = [(0,0),(3,4),(4,4),(1,0),(0,1),(4,3)]
k = 2
initial_centroids = [(1,1),(4,5)]


#Output 

k_means_clustering(data_points,k,initial_centroids) -> [0,1,1,0,0,1]

Behavioral
Medium
Machine Learning
Easy
Loading pricing options

View all Tusimple questions

Challenge

Check your skills...
How prepared are you for working at Tusimple?

TuSimple Salaries by Position

$108K
$140K
ML Engineer
Median: $123K
Mean (Average): $123K
Data points: 6
$82K
$180K
AI Research Scientist
Median: $103K
Mean (Average): $112K
Data points: 55
$86K
$137K
Software Engineer
Median: $99K
Mean (Average): $105K
Data points: 83
Data Engineer*
$99K
Data Engineer
Median: $99K
Mean (Average): $99K
Data points: 2
Data Scientist*
$75K
$80K
Data Scientist
Median: $78K
Mean (Average): $78K
Data points: 2
Data Analyst*
$63K
Data Analyst
Median: $63K
Mean (Average): $63K
Data points: 1

Most data science positions fall under different position titles depending on the actual role.

From the graph we can see that on average the ML Engineer role pays the most with a $123,333 base salary while the Data Analyst role on average pays the least with a $63,419 base salary.

Discussion & Interview Experiences

?
There are no comments yet. Start the conversation by leaving a comment.

Discussion & Interview Experiences

There are no comments yet. Start the conversation by leaving a comment.

Jump to Discussion