Anant - MATLAB Cody - MATLAB Central

Anant

7452
Rank
8
Badges
833
Score
1 – 50 of 69

Anant submitted Solution 13372706 to Problem 2959. Divide by 4

on 23 Mar 2024

Anant received Speed Demon badge for Solution 13372696

on 23 Mar 2024

Anant received Commenter badge for Problem 21. Return the 3n+1 sequence for n

on 23 Mar 2024

Anant submitted a Comment to Problem 21. Return the 3n+1 sequence for n

function c = collatz(n) c(1) = n; while (1>0) if (n == 1) c(end+1) = n; break elseif (mod(n,2) == 0) c(end+1) = n; n = n/2; collatz(n); else c(end+1) = n; n = 3*n + 1; collatz(n); end end c(1) = []; end This solution is correct as I ran the Test Cases myself. But the compiler timed out. What should I do ?

on 23 Mar 2024

Anant received Community Group Solver badge for Sum of series

on 5 Mar 2024

Anant received Community Group Solver badge for Laws of motion

on 5 Mar 2024

Anant received Community Group Solver badge for Programování - Cody

on 4 Mar 2024

1 – 50 of 69
Go to top of page