Skip to content

Files

Latest commit

d98d65c · Apr 2, 2020

History

History
This branch is up to date with loveneeshdhir/ACM-ICPC-Algorithms:master.

collatz_conjecture

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 2, 2020
Apr 2, 2020
Apr 2, 2020

Collatz Conjecture

In the field of mathematics the collatz conjecture was posed by L. Collatz in 1937 which states that given a number n, one can always 'get to one' by applying the following function recursively on the number.

Function for Collatz Conjecture

  1. **If number is even ** :
    number = number / 2

  2. **If number is odd ** :
    number = (3 * number) + 1