Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
assert(isequal(.5, round(1e6*coin_head_match(1))/1e6))
P =
0.5000
|
2 | Pass |
assert(isequal(.375, round(1e6*coin_head_match(2))/1e6))
P =
0.3750
|
3 | Pass |
assert(isequal(.3125, round(1e6*coin_head_match(3))/1e6))
P =
0.3125
|
4 | Pass |
assert(isequal(.273438, round(1e6*coin_head_match(4))/1e6))
P =
0.2734
|
5 | Pass |
assert(isequal(.246094, round(1e6*coin_head_match(5))/1e6))
P =
0.2461
|
6 | Pass |
assert(isequal(.225586, round(1e6*coin_head_match(6))/1e6))
P =
0.2256
|
7 | Pass |
assert(isequal(.139950, round(1e6*coin_head_match(16))/1e6))
P =
0.1399
|
8 | Pass |
assert(isequal(.125371, round(1e6*coin_head_match(20))/1e6))
P =
0.1254
|
9 | Pass |
assert(isequal(.114567, round(1e6*coin_head_match(24))/1e6))
P =
0.1146
|
10 | Pass |
assert(~isequal(1,2))
|
11 | Pass |
assert(isequal(.099347, round(1e6*coin_head_match(32))/1e6))
P =
0.0993
|
12 | Pass |
assert(isequal(.070386, round(1e6*coin_head_match(64))/1e6))
P =
0.0704
|
Given two strings, find the maximum overlap
461 Solvers
Number of 1s in the Binary Representation of a Number
356 Solvers
Make one big string out of two smaller strings
1148 Solvers
Create a vector whose elements depend on the previous element
391 Solvers
Flip the vector from right to left
2667 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!