From f21fa6cd8ef0b262388d5479bfb272da5d14e869 Mon Sep 17 00:00:00 2001 From: chandan23sde <114254861+chandan23sde@users.noreply.github.com> Date: Fri, 7 Oct 2022 19:39:13 +0530 Subject: [PATCH] =?UTF-8?q?Update=2010.1=20=E6=96=90=E6=B3=A2=E9=82=A3?= =?UTF-8?q?=E5=A5=91=E6=95=B0=E5=88=97.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have added a simplified code of Time complexity O(n) --- ...2\243\345\245\221\346\225\260\345\210\227.md" | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git "a/notes/10.1 \346\226\220\346\263\242\351\202\243\345\245\221\346\225\260\345\210\227.md" "b/notes/10.1 \346\226\220\346\263\242\351\202\243\345\245\221\346\225\260\345\210\227.md" index fd9e836bc1..a936422b15 100644 --- "a/notes/10.1 \346\226\220\346\263\242\351\202\243\345\245\221\346\225\260\345\210\227.md" +++ "b/notes/10.1 \346\226\220\346\263\242\351\202\243\345\245\221\346\225\260\345\210\227.md" @@ -31,6 +31,22 @@ public int Fibonacci(int n) { return fib[n]; } ``` +OR Simplified code +class FibonacciExample1{ +public static void main(String args[]) +{ + int n1=0,n2=1,n3,i,count=10; + System.out.print(n1+" "+n2);//printing 0 and 1 + + for(i=2;i