[HackerRank] Utopian Tree

Utopian Tree

This calculates the height of a tree after a given number of growth cycles, where there are two different types of cycles. One cycle doubles the height, the other only increases the height by one. I got to use a generator here, which is great. It took me probably too long to build the method to do the actual calculating, but afterwards I realize that it should have been easy.

February 22, 2017 at 06:40AM
via GitHub http://ift.tt/2l1zBEH


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s