Closed satkar2001 closed 2 years ago
since i didnt know where to upload the images i provided a online link . please accept the PR if its ok
@satkar2001, You may directly upload the images in the PR template itself. Kindly have a look at the attached screenshot.
@SarthakKeshari done
Issue Id you have worked upon -
357
Briefly explain your program logic -
since we need to predict winner if the game is played optimally,and alice makes the first move we need to find if there is a winning state(n) in the game so, whichever player lands at an odd state has no chance of winning the game, the second case can be if n is divisible even but maximum by 2, here too there is no chance so the only option is if n is divisible by even number maximum 4 . so the solution is to implement this using recursion
Screenshots(Attach 2 screenshots of your own input and output) -
Attach here
Checklist:
Eg - If your code follow the below guidelines. Kindly change [] to [x]
All the conditions should be fulfilled for considering your code for merging -
[x] I have mentioned the question as comment in my solution file.
[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code.
[x] My code gives the correct output.
[x] I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.
[x] I affirm that I strictly follow contributing guidelines and code of conduct.