I'm sorry... Hours? To write code that outputs the Fibonacci sequence?? I understand getting annoyed at being marked down for efficiency but come on... "HOURS"????
Genuinely how do you make an inefficient program for the Fibonacci sequence? The FIRST algorithm that comes to mind would work in O(n) time with O(1) memory use. How do you fail this badly?
The only possible problem I see with any program would be a bit limit but come on, you can afford three doubles to avoid any bugs. I could code the program in like 5 minutes (including the time to come up with the algorithm)😭💀🙏
Fibonacci sequence requires one recursive method in Java, no more. It takes 30 minutes maximum if you paid a little attention during the class and make all possible mistakes. It looks like auther write it without methods, which is possible(I don’t know for sure) but in my class this assignment was required to be done with recursion, this is why he got C (had done the assignment but done it wrong)
@@Entification In Binet's formula for the n-th fibonacci number, there's two terms in the numerator. One of them has an absolute value less than 1, so if you raise to a big power, it quickly goes to 0. So if you just ignore that term and round everything you get the n-th fibonacci number without needing previous ones.
I think the OP is just stupid. Anyone with any amount of coding experience can do the fibanacci sequence, no matter which language
Fr. How do you fuck up the Fibonacci sequence?
Yep, I agree, and with some knowledge from math, you can even get to the O(logN) algorithm
@@bananozavr Yeah, and with the formula you can get O(1) too
Bro i understood the fibonacci sequence in grade four what is a college student complaining about
I'm sorry... Hours? To write code that outputs the Fibonacci sequence?? I understand getting annoyed at being marked down for efficiency but come on... "HOURS"????
Genuinely how do you make an inefficient program for the Fibonacci sequence? The FIRST algorithm that comes to mind would work in O(n) time with O(1) memory use. How do you fail this badly?
The only possible problem I see with any program would be a bit limit but come on, you can afford three doubles to avoid any bugs. I could code the program in like 5 minutes (including the time to come up with the algorithm)😭💀🙏
This story must be some advanced kind of rage bait
Fibonacci sequence requires one recursive method in Java, no more. It takes 30 minutes maximum if you paid a little attention during the class and make all possible mistakes.
It looks like auther write it without methods, which is possible(I don’t know for sure) but in my class this assignment was required to be done with recursion, this is why he got C (had done the assignment but done it wrong)
is everybody just going to ignore the lady on the bed, like what the flip??
I call skill issue
idk anything about coding so i don’t have anything smart to say but i hope op passed their class this time 💗
Nah, op is absolutely stupid bruh. Literal 10 year old me could probably program better than OP
For fibonacci u can just use binet's formula and round phi^n / sqrt(5)
Ooh, why does that work? I’m interested
@@Entification In Binet's formula for the n-th fibonacci number, there's two terms in the numerator. One of them has an absolute value less than 1, so if you raise to a big power, it quickly goes to 0. So if you just ignore that term and round everything you get the n-th fibonacci number without needing previous ones.
@@EntificationWiki has a derivation utilizing matrices
Op was just stupid, atleast in india, the Fibonacci sequence code is something we do in like 11 grade
Damn, I mean damn... I mean what? damn