+ 3

Collatz Conjecture Code

Hello SoloLearners !! I came across this video on youtube: https://www.youtube.com/watch?v=5mFpVDpKX70 It talks about an interesting mathematical algorithm known as the Collatz Conjecture. It is very simple to understand and code. Here is my C++ code: https://code.sololearn.com/c5NM0SXfzO8O/#cpp Write your own code in your favorite language. It will be great if you can visualize the corresponding tree of values in the sequence. For more info just google Collatz Conjecture.

31st Dec 2017, 4:00 AM
Red Hawks
Red Hawks - avatar
6 Respostas
+ 10
While looking to see if any eigenvalue discussion was related to this problem, I found this: Collatz Conjecture https://explainxkcd.com/710/ The comments on explainxkcd often have relevant discussion so hope that's useful too :)
31st Dec 2017, 5:44 AM
Kirk Schafer
Kirk Schafer - avatar
+ 7
I already have made it a few months ago, using Recursion. https://code.sololearn.com/c2J7FsQOw6kQ/?ref=app
31st Dec 2017, 4:13 AM
Dev
Dev - avatar
+ 2
Nice code @Dev. Thanks for sharing.
31st Dec 2017, 4:17 AM
Red Hawks
Red Hawks - avatar
+ 1
It's very ironic, I made a code of this two hours ago jajaja, the comments are very similar but well, I will think is just a coincidence https://code.sololearn.com/cGhCuuHWCIs6/?ref=app
31st Dec 2017, 6:22 AM
Sebastián Zapata
Sebastián Zapata - avatar
+ 1
Thanks @Kirk and @Sebastian
31st Dec 2017, 1:48 PM
Red Hawks
Red Hawks - avatar
+ 1
https://code.sololearn.com/cPfc378E3hEk/?ref=app 👆Simple code... https://code.sololearn.com/c9uIkB0fFqPl/?ref=app 👆By creating a class and methods... Please upvote, if you like it!
21st Jul 2018, 12:42 AM
Nashat
Nashat - avatar