PayPal Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: In-Person
Find the max no of games played from the data, fix the rank metrics as rank_helper=(games played*wins/max games) or something similar to this and then sort the metrics and assign rank to the corresponding player accordingly.... By this the time complexity will be O(nlogn).
for each players calculate win% first.
- Sirius April 19, 2014we can calculate relative grading for each player
first calculate standard deviation for win percentage and no of years
1.5(sd) = A+
1(sd) = A
0.5(sd) = B+
etc
now assign credits for win% and no of years played.
The weightage could be according to you.. you can assign more credits to win% like 5
and for experience you can assign 3.
5 and 3 are as per my judgement. It could be based on some studies or survey.
assume these are the grades for each player
player win% years
1 A A
2 A+ C
3 B B+
relative grading for player1 (5*9+3*9)/8 = 9
relative grading for player2 (5*10+3*6)/8 = 8.5
relative grading for player3 (5*7+3*8)/8 = 7.37
this way ranks can be calculated.
any comments are appreciated