Hi! this is just a little single class monty hall problem implementation using Java. Using this class you are able to define a number of loop you want for your test. The result of the execution is the number of victories depending on whether you decide to change your choice or not and the execution time.
--- Little MONTY HALL PROBLEM implementation ---
Number of victories depending on whether you decide to change your choice or not (based on 10000000 tries) :
If you changed your choice : 6665640 (66,00%)
If you kept your choice : 3334360 (33,00%)
Execution time : 304ms
to compile
javac MhpImpl.java
to execute
java MhpImpl [number of loops]
Run with Docker
docker build -t mhp .
docker run --rm mhp [number of loops]
Note if not precised the default number of loops is 10000.