Convoy Interview Questions

Convoy Interview Guides

Click or hover over a slice to explore questions for that topic.
Data Structures & Algorithms
(75)
SQL
(57)
Machine Learning
(54)
Probability
(30)
Statistics
(22)

Convoy Interview Questions

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

QuestionTopicDifficulty
Data Structures & Algorithms
Medium

Given a 2D terrain represented by an array of non-negative integers, where each integer represents the height of a terrain level at that index, implement an algorithm to calculate the total amount of rainwater that can be trapped in this terrain. Consider that rainwater can only be trapped between two terrain levels with higher heights, and the trapped water cannot flow out through the edges.

The algorithm should have an optimal time complexity of O(n) and a space complexity of O(n). Provide a detailed explanation of the algorithm and its implementation in Python.

Example:

Index 0 1 2 3 4
Terrain Level 3 0 2 0 4
Trapped Water 0 3 1 3 0

In this table, the ‘Index’ row represents the position of the terrain levels, the ‘Terrain Level’ row shows the height of the terrain at each index, and the ‘Trapped Water’ row illustrates the trapped rainwater between the terrain levels. The total trapped rainwater in this example is 7 units (3 + 1 + 3).

Input:

terrainLevels = [3, 0, 2, 0, 4]

Output:

7

In this example, the terrain is represented by the terrainLevels array. The algorithm should calculate the total trapped rainwater, which is 7 units in this case. The trapped rainwater is formed between the heights of 3, 0, 2, 0, and 4.

SQL
Easy
SQL
Easy
Loading pricing options

View all Convoy Inc questions

Challenge

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

Convoy Salaries by Position

$180K
$204K
AI Research Scientist
Median: $190K
Mean (Average): $189K
Data points: 7
$139K
$198K
Product Manager
Median: $163K
Mean (Average): $169K
Data points: 8
$165K
Business Intelligence
Median: $165K
Mean (Average): $165K
Data points: 3
$120K
$201K
Software Engineer
Median: $164K
Mean (Average): $161K
Data points: 60
$94K
$183K
Data Scientist
Median: $123K
Mean (Average): $134K
Data points: 9
$67K
$103K
Business Analyst
Median: $80K
Mean (Average): $83K
Data points: 3

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

From the graph we can see that on average the AI Research Scientist role pays the most with a $189,286 base salary while the Business Analyst role on average pays the least with a $83,333 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