Utopian Tree : HackerRank Solution in Python

Period  Height
0 1
1 2
2 3
3 6
4 7
5 14
  • int n: the number of growth cycles to simulate
  • int: the height of the tree after the given number of cycles

Solution in Python 3

--

--

--

pretending to teach is one of the best way to learn.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why and How You Should Run a Beta Community

Access to Server Hardware is Disappearing. Does it Matter?

Solving the WiDS Datathon Challenge using Azure Automated ML and Azure Data Studio

Developing Serverless Applications on AWS using AWS Serverless Application Model (SAM)

Use your old Android Phone as an IP camera

What is Overengineering? Why Developers Do It and 4 Ways to Avoid It

Programming Quotes: Get Rid of Coding Boredom

Out with the old, In with the new

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Shounak Lohokare

Shounak Lohokare

pretending to teach is one of the best way to learn.

More from Medium

Hackerrank — Merge Sorted Linked list walkthrough #Python #Hackerrank

Python Algorithm: Pt. 12: GREEDY >:D

Memory Profiling in Python

Machine Learning in Python — Amazon Reviews