Practice for the Convoy interview with these recently asked interview questions.
| Question | Topic | Difficulty | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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:
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:
Output:
In this example, the terrain is represented by the | ||||||||||||||||||||
SQL | Easy | |||||||||||||||||||
SQL | Easy | |||||||||||||||||||
SQL | Easy | |
Machine Learning | Medium | |
Statistics | Medium | |
SQL | Hard | |
Machine Learning | Medium | |
Python | Easy | |
Deep Learning | Hard | |
SQL | Medium | |
Statistics | Easy | |
Machine Learning | Hard |
Check your skills...
How prepared are you for working at Convoy Inc?
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