Follow-up System Design rounds are there.
I haven't cracked the second round, though I gave a solution. The reason they shared is that I got 7 points out of 10, needing 9 points to crack the interview.
Reasons:
Find the candidate with the "popular vote." This is the candidate having the most number of first-choice votes from the electorate.
Find the "ranked choice" winner. This is calculated as follows:
Example: {([A, B, C] -> 4), ([B, C, A] -> 3), ([C, B, A] -> 2)}
This means that candidate A received 4 votes as the electorate's first choice, candidate B received 4 votes as the electorate's second choice, and candidate C received 4 votes as the electorate's third choice. Continuing further, candidate B received 3 votes as the electorate's first choice, candidate C received 3 votes as the electorate's second choice, and candidate A received 3 votes as the electorate's third choice, and so on.
Method 1: A (Max ballot rank 1 points)
Method 2: B (Remove the candidate with the least ballot points and compare the max ballot rank 1 points. If the max rank points are greater than 50% of other ballot winners, choose them as the winner).
Solution:
Popular winner: Candidate A is the popular winner, having received the most number of votes as the electorate's first choice.
Ranked winner: In this case, although candidate A received the most first-choice votes, it is not a clear majority (4 is not 50% of the total of 9 ballots). So, we remove the votes for the candidate with the least number of first-choice votes, which is C. Now we are left with {([A, B] -> 4), ([B, A] -> 3), ([B, A] -> 2)}, giving us the winner as candidate B, who now has 5 votes as the electorate's first choice.
java private String findPopularCandidate(Map<String, Integer> ballots) { // your code here }
private String findRankedWinner(Map<String, Integer> ballots) { // your code here }
The following metrics were computed from 3 interview experiences for the Coursera Senior Software Engineer role in India.
Coursera's interview process for their Senior Software Engineer roles in India is extremely selective, failing the vast majority of engineers.
Candidates reported having very negative feelings for Coursera's Senior Software Engineer interview process in India.