Skip to content

Handling fibonacci for negative numbers and 0 #42

Closed
@PoojaKhandhadia

Description

@PoojaKhandhadia

Function fibonacciTabular is not handled if a negative number is provided. It returns undefined as output.

If 0 is given as index in fibonacciTabular it returns 0 instead of 1.

@ashokdey For the functions fibonacci and fibonacciMemoized if negative numbers are provided the output is coming as 1. Is it correct to handle in such a way that the output should be 1 or it should be handled that the output comes as 0?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions