Recent | Popular
#java #gfg #geeksforgeeks #lecture #recursion #intro #basecase #recursivefunction #binaryrepresentation
import java.io.*; import java.util.*; class GFG { static void fun(int n) { if(n == 0) return; fun(n / 2); System.out.println(n % 2); } public static void main(String [] args) { fun(7); } }
#java #gfg #geeksforgeeks #lecture #recursion #intro #basecase #recursivefunction #logn
class GFG { static int fun(int n) { if(n == 1) return 0; else return 1 + fun(n / 2); } public static void main(String [] args) { System.out.println(fun(16)); } }
#java #gfg #geeksforgeeks #lecture #recursion #intro #basecase #recursivefunction
import java.io.*; import java.util.*; class GFG { static void fun(int n) { if(n == 0) return; System.out.println(n); fun(n - 1); System.out.println(n); } public static void main(String [] args) { fun(3); } }
import java.io.*; import java.util.*; class GFG { static void fun(int n) { if(n == 0) return; fun(n - 1); System.out.println(n); fun(n - 1); } public static void main(String [] args) { fun(3); } }
import java.io.*; import java.util.*; class GFG { static void fun1(int n) { if(n == 0) return; System.out.println("GFG"); fun1(n - 1); } public static void main(String [] args) { fun1(2); } }
Sun Feb 06 2022 20:31:27 GMT+0000 (Coordinated Universal Time)
Sun Feb 06 2022 20:28:19 GMT+0000 (Coordinated Universal Time)
Sun Feb 06 2022 20:25:24 GMT+0000 (Coordinated Universal Time)
Sun Feb 06 2022 20:25:17 GMT+0000 (Coordinated Universal Time)
Sun Feb 06 2022 20:18:14 GMT+0000 (Coordinated Universal Time)