You are correct in that your code is incorrect :p
Search:
Type: Posts; User: Artificial
Search: Search took 0.01 seconds.
- 24 Feb. 2012, 10:22pm
Thread: Interviewstreet CS 2 - Coin Tosses
by Artificial- Replies
- 4
- Views
- 1,356
You are correct in that your code is incorrect :p
- 15 Jan. 2012, 03:51am
Thread: Interviewstreet CS 2 - Coin Tosses
by Artificial- Replies
- 4
- Views
- 1,356
Interviewstreet CS 2 - Coin Tosses
http://i.minus.com/iDMcvQ732HBqO.png
Quite easy if you closely read the question. My solution is in Python:
import sys
def probHeads(n):
if n == 0:
return 0
d = pow(2,n)
Results 1 to 2 of 2