Video link for this paradox

There is 2 strategy

Strategy 1


Prisoners randomly will select and this probability is very, very low

Strategy 2


Prisoners will open box and and if number is not same then with that number they will go and find box which has same id they will repeat this again and again until find

In code there is 2 function strategy1 and strategy2

For testing in down you can call and use Dont call 2 function together

How to run file

This file use above stack limit that's why use command below nodemon --stack-size=9909000 server.js