Weird Algorithm CSES solution
Consider an algorithm that takes as input a positive integer n. If n is even, the algorithm divides it by two, and if nn is odd, the algorithm multiplies it by three and adds one. …
Consider an algorithm that takes as input a positive integer n. If n is even, the algorithm divides it by two, and if nn is odd, the algorithm multiplies it by three and adds one. …