Skip to content

Commit

Permalink
remove solution
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelAtFlatiron committed Jun 17, 2024
1 parent 67752cf commit 5dfba2b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@

function fib(num){
// Code here
if(num <= 2){
return 1;
}
let prev = 1;
let cur = 1;
for(let i = 3; i <= num; i++){
let newCur = prev + cur;
prev = cur;
cur = newCur;
}
return cur;
}

export { fib }

0 comments on commit 5dfba2b

Please sign in to comment.