Skip to content

Commit a0482a7

Browse files
Update Fibo.java
1 parent 006df2d commit a0482a7

File tree

1 file changed

+1
-1
lines changed
  • lectures/15-complexity/code/src/com/kunal

1 file changed

+1
-1
lines changed

Diff for: lectures/15-complexity/code/src/com/kunal/Fibo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static void main(String[] args) {
99
System.out.println(fiboFormula(50));
1010
}
1111

12-
static long fiboFormula(int n){
12+
static int fiboFormula(int n){
1313
// just for demo, use long instead
1414
return (int) ((Math.pow(((1+Math.sqrt(5))/2),n)-Math.pow(((1-Math.sqrt(5))/2),n))/Math.sqrt(5));
1515
}

0 commit comments

Comments
 (0)