I interviewed for amazon yesterday, with 1 hour interview. Interview has 1 behavioral question, followed by a technical question. This the technical questions that were asked:
There are certain amount of tennis matches to be play out by a player. To win the tournament he requires to win M games, and if somehow he managed to lose N games. what are the number of ways to do so.
ex - M = 6, N = 1
number of ways can be -
LWWWWWW
WLWWWWW
WWLWWWW
WWWLWWW
WWWWLWW
WWWWWLW
that is 6 ways. WWWWWWL not counted because if we win all 6 starting matches no need to go further. Initially I am trying with permutation but with the bigger inputs(M,N), the problem is getting complex.
I have no idea how to address such problem.