Skip to content

Instantly share code, notes, and snippets.

View harsh183's full-sized avatar
😺
People pleasing users

Harsh Deep harsh183

😺
People pleasing users
View GitHub Profile
# Basic implementation of the monty hall problem based on
# http://mathforum.org/dr.math/faq/faq.monty.hall.html
#
# Harsh Deep
# 18.7.2016
# This is a acceptable door configuration, :goat means that there is a goat
# behind and :car means that there is a car behind.
doors = [:goat, :car, :goat]
import java.util.Random;
public class GameShow
{
public static void main()
{
Random r= new Random();
int stayResult=0;
int switchResult=0;
for(int x=0;x<100000;x++)
{