Toptal Interview Questions

Toptal Interview Guides

Click or hover over a slice to explore questions for that topic.
Data Structures & Algorithms
(62)
Machine Learning
(45)
SQL
(32)
Probability
(22)
A/B Testing
(22)

Toptal Interview Questions

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

QuestionTopicDifficulty
Machine Learning
Hard

You are given a list of [x,y] coordinates in a matrix called X.

Write a function using gradient descent to return a tuple describing the line of best fit for the given coordinates. The first number in the tuple should be the line’s slope. The second number in the tuple should be its y-intercept.

You may not import any libraries.

Example:

Input:

coordinates = [(0, 1), (1, 3), (2, 2), (3, 4), (4, 6), (5, 5), (6, 7), (7, 9), (8, 8), (9, 10), (10, 12), (11, 11), (12, 13), (13, 15), (14, 14), (15, 16), (16, 18), (17, 17), (18, 19)]

Output:

(1, 1) 
SQL
Easy
A/B Testing
Medium
Loading pricing options

View all Toptal questions

Challenge

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

Toptal Salaries by Position

$76K
$120K
Software Engineer
Median: $110K
Mean (Average): $103K
Data points: 4

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

From the graph we can see that on average the Software Engineer role pays the most with a $102,750 base salary while the Software Engineer role on average pays the least with a $102,750 base salary.

Discussion & Interview Experiences

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