Skip to content

Conversation

@stevenwaldron
Copy link

No description provided.

Copy link

@imxande imxande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Exercise II, the building and egg problem. A better solution will be using Binary Search. This allows us to always divide the search by half. I mean imagine we are the ones who have check every single floor. That would take ages. Check this out:

https://www.geeksforgeeks.org/complexity-analysis-of-binary-search/

@stevenwaldron
Copy link
Author

stevenwaldron commented Oct 17, 2020 via email

@imxande
Copy link

imxande commented Oct 21, 2020

Sent from my iPhone
On Oct 16, 2020, at 8:53 PM, Alejandro E Rodriguez @.***> wrote:
I see what you mean. I put myself in the situation mentally and asked myself how would I do it that’s how I came up with that answer. I see how binary search is better though. How did I do overall? Did I pass

 @imxande commented on this pull request. On Exercise II, the building and egg problem. A better solution will be using Binary Search. This allows us to always divide the search by half. I mean imagine we are the ones who have check every single floor. That would take ages. Check this out: https://www.geeksforgeeks.org/complexity-analysis-of-binary-search/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Of course you passed, great job Steven keep it up!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants