Cody

Problem 44713. The Google Interview: Two Eggs Problem

Solution 2199203

Submitted on 8 Apr 2020 by fabio caruso
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(Google(1),1))

d = 1

2   Pass
assert(isequal(Google(5),3))

d = 3

3   Pass
assert(isequal(Google(20),6))

d = 6

4   Pass
assert(isequal(Google(50),10))

d = 10

5   Pass
assert(isequal(Google(75),12))

d = 12

6   Pass
assert(isequal(Google(100),14))

d = 14

7   Pass
assert(isequal(Google(120),15))

d = 15

8   Pass
assert(isequal(Google(180),19))

d = 19

9   Pass
assert(isequal(Google(250),22))

d = 22

10   Pass
assert(isequal(Google(320),25))

d = 25

11   Pass
assert(isequal(Google(360),27))

d = 27

12   Pass
assert(isequal(Google(410),29))

d = 29

13   Pass
assert(isequal(Google(500),32))

d = 32

14   Pass
assert(isequal(Google(610),35))

d = 35

15   Pass
assert(isequal(Google(1000),45))

d = 45

Suggested Problems

More from this Author18

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!