Hopper Interview Questions

Hopper Interview Guides

Click or hover over a slice to explore questions for that topic.
Data Structures & Algorithms
(56)
Machine Learning
(42)
SQL
(37)
Product Sense & Metrics
(30)
Probability
(26)

Hopper Interview Questions

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

QuestionTopicDifficulty
Data Structures & Algorithms
Medium

You are given a graph, which is implemented as a 2D array. Each cell in the array represents a node and the value in the cell represents the cost to traverse to that node. You are also given a start node and an end node. Your task is to implement a function that finds the shortest path from the start node to the end node using any shortest path algorithm.

Example 1:

Input:

graph = [[0, 4, 0, 0, 0, 0, 0, 8, 0],
            [4, 0, 8, 0, 0, 0, 0, 11, 0],
            [0, 8, 0, 7, 0, 4, 0, 0, 2],
            [0, 0, 7, 0, 9, 14, 0, 0, 0],
            [0, 0, 0, 9, 0, 10, 0, 0, 0],
            [0, 0, 4, 14, 10, 0, 2, 0, 0],
            [0, 0, 0, 0, 0, 2, 0, 1, 6],
            [8, 11, 0, 0, 0, 0, 1, 0, 7],
            [0, 0, 2, 0, 0, 0, 6, 7, 0]]
start = 0
end = 4

Output:

shortest_path(graph, start, end) -> [0, 1, 2, 5, 6, 7, 8, 4]

Example 2:

Input:

graph = [[0, 5, 0, 9, 1],
            [5, 0, 3, 0, 2],
            [0, 3, 0, 0, 0],
            [9, 0, 0, 0, 0],
            [1, 2, 0, 0, 0]]
start = 0
end = 2

Output:

shortest_path(graph, start, end) -> [0, 4, 1, 2]
Product Sense & Metrics
Medium
Behavioral
Easy
Loading pricing options

View all Hopper questions

Challenge

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

Hopper Salaries by Position

$138K
$190K
Data Scientist
Median: $160K
Mean (Average): $165K
Data points: 5
$113K
$218K
Software Engineer
Median: $160K
Mean (Average): $159K
Data points: 16
$127K
$147K
Product Manager
Median: $129K
Mean (Average): $134K
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 Data Scientist role pays the most with a $165,000 base salary while the Product Manager role on average pays the least with a $133,592 base salary.

Discussion & Interview Experiences

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