CarWale Interview Experience

CarWale Interview Experience

Tags
Interview
Date
July 19, 2023
 

Round 0) Pre Screening

Although not a formal round, all interested candidates had to apply and upload their CV, 10th marks, 12th/Diploma marks, etc. Based on this, a total of 132 students were shortlisted. Although I do not know the exact number of people who applied, I know quite a few people who unfortunately did not get selected.

Round 1) Online coding test

The first round consisted of an online coding test that had to be taken from college labs using college PCs. The HR and other staff of CarWale were supervising us. They did not allow us to even look up syntax or method names online. The most important thing to note here is that you are not allowed to use Python. This was informed to us just 3 days prior to the online coding test. For a person like me who is “Obsessed with Python” this was very grave news as since the past month I have been studying Python in and out and switching to another language within 3 days would be very difficult.
There were a total of 4 questions in the online round which was held on the Coderbyte platform. 1 easy, 2 medium & 1 hard. I have also listed all the questions below.
Note: I am writing the exact problems as shown to us below.

Coderbyte Platform Overview

 
How the Coderbyte Platform looks
How the Coderbyte Platform looks
Languages available for the first round
Languages available for the first round

Easy:

1) String Challenge:
Have the function StringChallenge (str) take the str parameter being passed and return it in upper camel case format where the first letter of each word is capitalized. The string will only contain letters and some combination of delimiter punctuation characters separating each word.
For example: if str is “Daniel LikeS-coding” then your program should return the string DanielLikesCoding.

Medium:

2) Array Challenge:
Have the function ArrayChallenge (num) take the num parameter being passed and return the next number in the sequence according to the following rule: to generate the next number in a sequence read off the digits of the given number, counting the number of digits in groups of the same digit. For example, the sequence beginning with 1 would be: 1, 11, 21, 1211, ... The 11 comes from there being “one 1” before it and the 21 comes from there being “two 1’s” before it. So your program should return the next number in the sequence given num
 
3) Searching Challenge:
Have the function SearchingChallenge (str) take the str parameter being passed and find the longest substring that contains k unique characters, where k will be the first character from the string. The substring will start from the second position in the string because the first character will be the integer For example: if str is “2aabbacbaa” there are several substrings that all contain 2 unique characters, namely.["aabba”, “ac”, “cb", “ba”], but your program should return “aabba” because it is the longest substring. If there are multiple longest substrings, then return the first substring encountered with the longest length. k will range from 1 to 6.

Hard:

4) Graph Challenge
Have the function GraphChallenge(strArr) read strArr which will be a representation of an undirected graph in a form similar to an adjacency list. Each element in the input will contain an integer which will represent the population for that city, and then that will be followed by a comma separated list of its neighboring cities and their populations (these will be separated by a colon). For example strArr may be
["1:[5]", "4:[5]", "3:[5]", "5:[1,4,3,2]", "2:[5,15,7]", "7:[2,8]", "8:[7,38]", "15:[2]", "38:[8]"]
This graph then looks like the following picture:
notion image
Each node represents the population of that city and each edge represents a road to that city. Your goal is to determine the maximum traffic that would occur via a single road if everyone decided to go to that city. For example: if every single person in all the cities decided to go to city 7, then via the upper road the number of people coming in would be (8 + 38) = 46. If all the cities beneath city 7 decided to go to it via the lower road, the number of people coming in would be (2 + 15 + 1 + 3 + 4 + 5) = 30. So the maximum traffic coming into the city 7 would be 46 because the maximum value of (30, 46) = 46.
Your program should determine the maximum traffic for every single city and return the answers in a comma separated string in the format:
city:max_traffic,city:max_traffic,...
The cities should be outputted in sorted order by the city number. For the above example, the output would therefore be:
1:82,2:53,3:80,4:79,5:70,7:46,8:38,15:68,38:45
The cities will all be unique positive integers and there will not be any cycles in the graph. There will always be at least 2 cities in the graph.

The Challenge Token

While the above questions may not seem so difficult, here is where the challenge comes: Each and every candidate has to add a token to their output string, and the way you add a token is different for each candidate. For example, here is what I got:
 This is for the String challenge, the easy problem
This is for the String challenge, the easy problem
Even though the return type of function in problem 2 was int we were somehow expected to intersperse the token with the output and return the final output which wouldn’t be an intbut rather a String. But some of my friends got different challenges, including just concatenating the token to the end of the output which is fairly trivial and can be achieved with an extra print statement. So even though all problems may be the same, all challenges were not.

Final words:

Unfortunately I couldn’t make it past the first round, even though my output was correct I was unable to intersperse the token and hence my code wouldn’t pass the test cases.
I have written this post in the hopes of helping others who have their interviews coming up. If you would like to share your experience, please feel free to comment down below.
And even if you get rejected, don’t get dejected!
 
 

Loading Comments...