Skip to main content
Joel's user avatar
Joel's user avatar
Joel's user avatar
Joel
  • Member for 10 years
  • Last seen more than 5 years ago
awarded
awarded
awarded
accepted
awarded
comment
Guess My Number - computer guesses the user's number
The ability to use a binary search is one of the big reasons that so much effort goes into sorting lists. If a length N list isn't sorted and we want to find something, on average it takes N/2 steps to find it. If it's sorted and we use a binary search it takes log(N) steps. So if N=1024, it'll take about 512 steps if the list isn't sorted, but 10 if it is.
Loading…
revised
Loading…
comment
Class used for stochastic epidemic simulations
What's the best way to handle the fact that the user will pass in "infectionTime", and possibly modify it later? I'd want it to stay the same in the class.
awarded
awarded
revised
Loading…
Loading…
Loading…
awarded
awarded
accepted
awarded
asked
Loading…