Page 1 of 1

The following algorithm calculates the nth element of a sequence: Method seq(n) If n = 1 or n = 2 Then return 1 Else ret

Posted: Fri Jul 01, 2022 5:34 am
by answerhappygod
The Following Algorithm Calculates The Nth Element Of A Sequence Method Seq N If N 1 Or N 2 Then Return 1 Else Ret 1
The Following Algorithm Calculates The Nth Element Of A Sequence Method Seq N If N 1 Or N 2 Then Return 1 Else Ret 1 (88.12 KiB) Viewed 41 times
The following algorithm calculates the nth element of a sequence: Method seq(n) If n = 1 or n = 2 Then return 1 Else return seq(n-1) + seq(n-2) EndMethod What is seq(3)? Select one: O2