Software Developer Interview Experience at ClickTherapeutics
Summary
I had a technical interview at ClickTherapeutics where I was presented with two data manipulation problems involving election data and determining leading candidates, which I solved by implementing Python solutions.
Full Experience
After an initial phone discussion, I scheduled three dates for the technical interview. Following a cancellation and a postponement, I finally connected with the technical interviewer for the coding session. I found the questions to be relatively straightforward, focusing on practical data manipulation scenarios.
Interview Questions (2)
You have election data stored as an array of objects, where each object contains a candidate's name and a timestamp. You need to write a method that accepts this array of votes and a specific timestamp. The method should return the leading candidate (the one with the most votes) at or before the given timestamp.
Example:
votes = [{'candidate':'a', 'timestamp':2},{'candidate':'c', 'timestamp': 5},{'candidate':'c', 'timestamp': 12}]
timestamp = 5
Each array element represents an individual vote, with the candidate they voted for and the time the vote occurred. I need to return the leading candidate within that timestamp duration.
Modify the previous method to accept an additional field k. The method should now return the first k leading candidates (the candidates with the most votes, up to k) at or before the given timestamp.
Example (referencing previous data):
print(leading_candidates(votes, timestamp, 2))