## PayPal Interview Question for Software Engineer / Developers

• 0

Country: United States
Interview Type: In-Person

Comment hidden because of low score. Click to expand.
1
of 1 vote

for each players calculate win% first.
we 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.

Comment hidden because of low score. Click to expand.
0
of 0 vote

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).

Comment hidden because of low score. Click to expand.
0

suggest any better solution...

Comment hidden because of low score. Click to expand.
0

it can be like this:

let given data is:
1.total no of games played
2.total wins
3.total loss
4.total years played

we can store the following calculated value in a metrics and sort it;

[no of games played*{(wins-lost)/(wins%lost)}] / (total years played)

Comment hidden because of low score. Click to expand.
0
of 0 vote

Isnt number_of_games_played = wins + losses?

So rank = (wins)/(number_of_games_played x total_years)

Comment hidden because of low score. Click to expand.
0
of 0 vote

We have to calculate the win % for each player..... Based on the win%, we can rank the players

Win% can be calculated by using the formula
( no of wins) / ( no of games played )

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.