Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Solution is not correct #214

Open
0xKarl98 opened this issue Jun 30, 2022 · 2 comments
Open

Solution is not correct #214

0xKarl98 opened this issue Jun 30, 2022 · 2 comments

Comments

@0xKarl98
Copy link

Under recursions / collatz_sequence.cairo , the answer is :

image

Which it should be
image

and in terms of the test ,
image

it didn't stop the computation when n reaches to 1 ,
so the correct version should be
image

@Codiumdium
Copy link
Contributor

Hello ! Your code does not return the nth number of collatz from the seed. This is the purpose of this exercise. (step == nth)

(You can use ``` some code ``` for your code).

@0xKarl98
Copy link
Author

0xKarl98 commented Jun 30, 2022

Ah.. yeah what i'm trying to do is that this exercise didn't include the situation where the seed would be 0 , which is not satisfiable for us .
And also in terms of the step interation , i think it shoud be step = step + 1 , instead of step = step -1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants