Fibonacci Modified Java Coding Challenge | HackerRank | How'd You Code That?

preview_player
Показать описание
Fibonacci Modified on HackerRank:

The Fibonacci sequence is one of the most famous formulas in mathematics.
Each number in the sequence is the sum of the two numbers that precede it. So, the sequence goes: 0, 1, 1, 2, 3, 5, 8, 13, and so on. The mathematical equation describing it is Xn+2= Xn+1 + Xn.

The Fibonacci sequence is tightly connected to what's now known as the golden ratio. The ratio of the numbers in the sequence, as the sequence goes to infinity, approaches the golden number, which is 1.6180339887498948482...

The Fibonacci sequence and golden ratio are eloquent equations but aren't as magical as they may seem.

The golden ratio does seem to capture some types of plant growth. For instance, the spiral arrangement of leaves or petals on some plants follows the golden ratio. Pinecones exhibit a golden spiral, as do the seeds in a sunflower. But there are a plethora of plants that do not follow this rule; therefore, it should not be said that the fibonacci sequence is “God’s rule for growing things”. The sequence does; however, appear in branches of advanced mathematics, applications in computer science, statistics, and nature - giving it quite a mystique.

Song: Stardust - Ikson (Vlog No Copyright Music)
Music promoted by Vlog No Copyright Music.
Рекомендации по теме
Комментарии
Автор

Thank you very much for this video. You all have explained very nicely and in simple manner

KidsCreativeTime
Автор

Hey ed, why does the loop executes n-2 times?

anubhavnegi
visit shbcf.ru