This is for Senior Backend Developer Role. There were 2 questions with 70 mins time.
Question 1:

I solved the above in time complexity O(n)
Question 2:


I solved the above in time complexity: to sort - O(NlogN) N is the number of potholes. and subsequent iteration in O(n)
Solved both in java.