Re 2. Problems on Recursion | Strivers A2Z DSA Course

Sdílet
Vložit
  • čas přidán 23. 12. 2021
  • Check our Website:
    Notes:
    Understand recursion by printing something N times: takeuforward.org/recursion/in...
    Print name N times using recursion: takeuforward.org/recursion/pr...
    Print 1 to N using recursion: takeuforward.org/recursion/pr...
    Print N to 1 using recursion: takeuforward.org/recursion/pr...
    Sum of first N numbers: takeuforward.org/data-structu...
    Factorial of N numbers: takeuforward.org/data-structu...
    Reverse an array: takeuforward.org/data-structu...
    Check if a string is palindrome or not: takeuforward.org/data-structu...
    Fibonacci Number: takeuforward.org/arrays/print...
    In case you are thinking to buy courses, please check below:
    Link to get 20% additional Discount at Coding Ninjas: bit.ly/3wE5aHx
    Code "takeuforward" for 15% off at GFG: practice.geeksforgeeks.org/co...
    Code "takeuforward" for 20% off on sys-design: get.interviewready.io?_aff=takeuforward
    Crypto, I use the Wazirx app: wazirx.com/invite/xexnpc4u
    Take 750 rs free Amazon Stock from me: indmoney.onelink.me/RmHC/idje...
    Earn 100 rs by making a Grow Account for investing: app.groww.in/v3cO/8hu879t0
    Linkedin/Instagram/Telegram: linktr.ee/takeUforward
    ---------------------------------------------------------------------------------------------------------------------------------------------------- Check Codestudio: bit.ly/3G61sZZ
    Please check out the entire channel for other sets of series on tougher and complex topics. Also do consider subscribing :)
    Please check out the SDE sheet which the entire country is using and getting placed at top-notch companies: takeuforward.org/interviews/s...
    Checkout Striver's Handles: linktr.ee/takeUforward

Komentáře • 1K

  • @takeUforward
    @takeUforward  Před 2 lety +304

    Please do comment how was it ? :)

    • @DurgaShiva7574
      @DurgaShiva7574 Před 2 lety +6

      public class recursiveCode {
      public static void main(String[] args) {
      //print n to 1 using backtrackign, i.e without using n-1 approach
      backTrack(0,4);
      }
      static void backTrack(int start, int n)
      {
      if (n == start)
      {
      return;
      }
      backTrack(start+1,n);
      System.out.println(start+1);
      }
      }

    • @sehejwahla5437
      @sehejwahla5437 Před 2 lety +3

      void f(int i, int j){
      if(i==-1) return;
      f(i-1, j);
      if(i==j) return;
      cout

    • @PRABHATKUMAR-ek5cu
      @PRABHATKUMAR-ek5cu Před 2 lety +2

      Thanks striver for this series, waiting for DP series

    • @rishavkavlog
      @rishavkavlog Před 2 lety +16

      As always fantastic
      Soln:
      #include
      using namespace std;
      void print(int i, int n)
      {
      if (i > n) return;
      print(i + 1, n);
      cout N;
      print(1, N);
      return 0;
      }

    • @sehejwahla5437
      @sehejwahla5437 Před 2 lety

      Bhai thank u so much. Only coz of u i am finally understanding recursion and backtracking

  • @anutoshghosh7893
    @anutoshghosh7893 Před rokem +74

    In recursion while going, things happen while in backtracking, in coming back things happen, that's why the term backtracking, so well explained!!

    • @satviikk
      @satviikk Před 2 měsíci +2

      i missed it, thanks'

  • @vaishnaviupadhyay2239
    @vaishnaviupadhyay2239 Před rokem +97

    Code for printing N to 1 using backtracking concept:
    #include
    using namespace std;
    void print(int n , int i)
    {
    if(n

    • @souravjoshishorts7199
      @souravjoshishorts7199 Před 11 měsíci

      Bro i didn't understand how this code was executed if we write i +1 then why code was not starting from 1 to n? Please give answer

    • @pwnified1736
      @pwnified1736 Před 11 měsíci +25

      @@souravjoshishorts7199 bhai isten to what striver said he said ki aap print ko pehle likhne ke jagah function ko wapis call kar rhe ho toh woh jo number pehle print hona tha last mei print hoga and so on...jasa n= 4 then woh stack mei store hote jaega in order 1,2,3,4 uske baad jab base case reach hoga toh woh function call karte rahega so order will be changed to 4,3,2,1 😉

    • @user-ri5gw3ty1y
      @user-ri5gw3ty1y Před 23 dny

      Nice answer, it does require two vars...

    • @jitendrabaravkar
      @jitendrabaravkar Před 22 dny +2

      ​@@user-ri5gw3ty1y
      #include
      using namespace std;
      void f(int cnt, int n) {
      if (cnt == 0) return;
      cout n;
      cnt = n;
      f(cnt, n);
      return 0;
      }

    • @manashpratimbhowmick7211
      @manashpratimbhowmick7211 Před 6 hodinami

      @@souravjoshishorts7199 notice carefully void function k bad wo firse bar bar function ko call karrha ha jis karan use print karne ka mauka hi nahi milraha in short print line hit he nahi karraha ha and jab wo base condition ko hit karega last m tb jab wo back jayega yafir backtrack krega har function m tab wo ak ak kar k print krega .

  • @deepakagrawal2392
    @deepakagrawal2392 Před rokem +165

    For the problems #3 and #4, you don't need to pass two parameters. f(i) will be sufficient!

    • @nikhildotasara8788
      @nikhildotasara8788 Před rokem +13

      I think for the first one only one parameter is enough.But for the second one i have used two.

    • @omkarraskar8664
      @omkarraskar8664 Před rokem +5

      @@nikhildotasara8788 for second too you can do with 1 parameter

    • @lakshmivenkatavarun8406
      @lakshmivenkatavarun8406 Před rokem +1

      @@omkarraskar8664 How bro?

    • @ramanahlawat398
      @ramanahlawat398 Před rokem +4

      @@nikhildotasara8788 u r correct bro we need another parameter in #5th problem

    • @mahadevgopanpalli6194
      @mahadevgopanpalli6194 Před rokem +15

      @@ramanahlawat398 for all problems only one parameter is sufficient bcoz if we see every prob statement clearly
      Although, he was teaching , so he need to take such example

  • @rohitsrivastava3768
    @rohitsrivastava3768 Před 2 lety +160

    Dude you are underrated, amazing amount of effort it takes!

  • @akash5653
    @akash5653 Před 2 lety +77

    This gave me some confidence and understanding of Recursion. Thank You so much!

  • @akhileshsaga217
    @akhileshsaga217 Před rokem +161

    Question 5 - Java Code :
    public class PrintNumbersinReverseUsingBackTracking{
    static void reverse(int i,int N){
    if(i>N){
    return ;
    }
    reverse(i+1,N);
    System.out.println(i);
    }
    public static void main(String args[]){
    int N=10;
    reverse(1,N);
    }
    }

    • @muhammedhuzaifa1392
      @muhammedhuzaifa1392 Před 9 měsíci

      ​@clawseekgaming4681N is input and compareing with so i cant exceed the limit of i=1; other wise you will face swgmental fault error 🙃

  • @Ironman2.0xCode
    @Ironman2.0xCode Před rokem +8

    With each passing vdo of Striver bhaiya i saw , I am becmoing fan of him. When it comes to DSA i always recmmmend to watch Striver's vdo to my friends and juniors. The clarity in each topic is just wow.

  • @vm1662
    @vm1662 Před 11 měsíci +5

    Can't believe all of this is for free!!! Thank you so much take U forward team!

  • @abhisekmishra5245
    @abhisekmishra5245 Před 2 lety +31

    Now I'm gaining more confidence in recursion. Amazing explaination. 😃

  • @ayushrawat9252
    @ayushrawat9252 Před 2 lety +19

    Question 5 -> Print no from N to 1 using backtracking
    #include
    using namespace std;
    void printName(int i , int n){
    if(i>n){
    return;
    }
    printName(i+1 ,n);
    std::cout

    • @lex-zt6uc
      @lex-zt6uc Před rokem

      Brother why use std:: when u have imported the whole std library itself

    • @ayushrawat9252
      @ayushrawat9252 Před rokem

      @@lex-zt6uc it was auto completed by the compiler so i do not erase the std

    • @Akash-yr2if
      @Akash-yr2if Před rokem

      Why std::

    • @ayushrawat9252
      @ayushrawat9252 Před rokem

      @@Akash-yr2if if you are not using "using namespace std" then we have to use Std in every cin and cout

    • @Akash-yr2if
      @Akash-yr2if Před rokem +1

      @@ayushrawat9252 I knw that...But even after using it in the header, Why have u used it.

  • @bhaswatiroy1433
    @bhaswatiroy1433 Před 2 lety +19

    I really don't know if someone explains as good as you do !!!! 👏 Unbelievable Efforts

  • @CodingVeda
    @CodingVeda Před rokem +3

    This video really boosted my confidence for recursion. Thank you so much

  • @de_ansh
    @de_ansh Před 2 lety +7

    One of the best playlist on recursion, thank you so much bhaiya.

  • @hemalathasunnapu750
    @hemalathasunnapu750 Před 2 lety +2

    The videos are absolutely from basic. Great Explanation

  • @kushagraahire1871
    @kushagraahire1871 Před 2 lety +14

    public static void main(String[] args)
    {
    Scanner input = new Scanner ( System.in );
    System.out.print("Enter the value of n : ");
    int n = input.nextInt();
    int i=1;
    printNumbers(i,n);
    input.close();
    }
    static void printNumbers(int i , int n )
    {

    if(i>n)
    {
    return;
    }
    else{
    printNumbers(i+1,n);
    System.out.println(i);

    }
    }
    }
    You are one of the best DSA tutor

  • @NaturesVibee
    @NaturesVibee Před rokem +32

    PRINT FOR N To 1 using Backtracking
    #include
    using namespace std;
    void print(int i, int n){
    if (n

  • @user-ps1tn1el1v
    @user-ps1tn1el1v Před 3 měsíci +6

    for N to 1
    we only need one parameter
    #include
    using namespace std;
    void print(int n){
    if(n == 0){
    return;
    }
    cout n;
    print(n);
    return 0;
    }

  • @kunalwadhai777
    @kunalwadhai777 Před 7 měsíci +1

    Bhaiya you understand the concept of recursion in a very simple way, hats of for that and I am blessed that I can learn from such a guru.

  • @kshitijraj1320
    @kshitijraj1320 Před 5 měsíci +1

    Finally understood the meaning of printing after and before function call,Thank you striver 🙌🙌

  • @travelwithmightymocha
    @travelwithmightymocha Před 2 lety +7

    def backtrack(i, n):
    if i > n:
    return
    backtrack(i+1, n)
    print(i)
    backtrack(1, 5)

  • @timothyajani7100
    @timothyajani7100 Před rokem +3

    You're a teacher. I just understood what I thought was magic

  • @lathishgajula387
    @lathishgajula387 Před 5 měsíci +4

    just do condition(i>n) return ;
    then apply function (i+1,n)
    then cout

  • @siddhantdwivedi7024
    @siddhantdwivedi7024 Před 2 lety

    you completely nailed it bruhh!!!!!!!!!!! thanks for making such a beautiful series

  • @RahulKumar-rk1tf
    @RahulKumar-rk1tf Před 2 lety +81

    Start at: 1:08
    Back Tracking : 15:25

  • @farazfarooqui8656
    @farazfarooqui8656 Před rokem +4

    Best material out their ... love the way u connected/distinguished recursion from backtracking

  • @coding8000
    @coding8000 Před 2 lety

    thanks!The Explanation of your is at God Level,Best on the internet and planet earth., Please keep doing such work.,Thanks you.Love from Mumbai. Thanks a lot.

  • @__ngl__
    @__ngl__ Před 5 měsíci

    hi, thank you so much for this video!! i've always struggled with backtracking and for the first time ever, i felt like i understood it.

  • @yashhokte1020
    @yashhokte1020 Před rokem +6

    Solution of the assignment given by you : print n to 1 using Backtracking :
    private static void print(int i, int n){
    if(i>n)
    return;
    print(i+1,n);
    System.out.println(i); // Backtracking !!
    }
    public static void main(String[] args) {
    print(1,5);
    }
    Thankyou bhaiya for making this concept in such a crystal clear way !! Loved the way u simplify the things to us , May wish you will achieve all your sky offers to you ..

    • @Iqbal00123
      @Iqbal00123 Před rokem +1

      You are right brother , he is great at teaching...

    • @yashhokte1020
      @yashhokte1020 Před rokem

      @@Iqbal00123 yes brother

  • @devarora6995
    @devarora6995 Před 2 lety +93

    #include
    using namespace std;
    void f(int i,int N){
    if(i>N)return;
    f(i+1,N);
    cout

  • @Manishgupta200
    @Manishgupta200 Před rokem +2

    Thankyou Striver. Before wathing this video.. in my mind, I'm feared a lot of the names say Backtracking, Segmentation, Brute force approach. .. But you cleared my doubt. Not, it's easy to analyse every term

  • @parthsalat
    @parthsalat Před 2 lety +1

    Thank you.
    I understood it completely.
    May this comment make youtube feature this video to all users.

  • @shashanksharma7747
    @shashanksharma7747 Před 2 lety +13

    public static void main(String[] args)
    {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    fun(1,n);

    }
    static void fun(int i,int n){
    if(i>n)
    return ;
    fun(i+1,n);
    System.out.println(i);
    }

  • @Sanjeev.Network
    @Sanjeev.Network Před 2 lety +4

    recurse(int N,int final){
    if(final>N) return;
    recurse(N,final+1);
    print(final);
    }

  • @aryanpinto5105
    @aryanpinto5105 Před 2 lety +1

    Best video for Recursion basics on CZcams!!!

  • @TheAditya-zt9pb
    @TheAditya-zt9pb Před měsícem

    Loved the way you explained the concept of recursion and Backtracking ,i was able to get a clear picture of it and Thanks fot it

  • @amanbhadani8840
    @amanbhadani8840 Před 2 lety +6

    I don't think,we need to carry value of N with i everytime if base case dont need it.Rest explanation is amazing.

  • @gyaneshjha19
    @gyaneshjha19 Před rokem +5

    Yaar thanks a lot striver, I was unable to understand the recursion even after doing 30 to 35 questions ,and ur this single video helped me in getting the concept easily,
    After watching this video I was like my life was lie 😂

    • @yashhokte1020
      @yashhokte1020 Před rokem

      bro we are sailing on the same boat , would like to discuss something related recursion to you !! shall we?

  • @abhaytiwari6411
    @abhaytiwari6411 Před 2 lety +1

    Thank for making such a wonderful series.

  • @omgaikwad5962
    @omgaikwad5962 Před rokem

    Excellent teaching! understood the concept of Recursion

  • @sarikaabarnwal
    @sarikaabarnwal Před 2 lety +6

    Class A{
    public void print(int n){
    if(n

  • @percussionistbypassion2931
    @percussionistbypassion2931 Před 2 lety +11

    C++ - Print N to 1 using recursion but with backtracking:
    #include
    using namespace std;
    int n, i = 1;
    void f(int x,int y);
    void f(int i,int n)
    {
    if(i>n) return;
    f(i+1,n);
    cout

  • @afuadajoemmanuel5735
    @afuadajoemmanuel5735 Před rokem

    Thanks for all you do Striver ❤

  • @shrunkhalaraut7789
    @shrunkhalaraut7789 Před rokem

    Thanks for the video. 1st time I understand the backtracking.

  • @tanveer.shaikh
    @tanveer.shaikh Před 2 lety +10

    for the third question we could have a single function call with n only

  • @zorodluffy6415
    @zorodluffy6415 Před 2 lety +7

    #include
    using namespace std;
    void printn_1_backTracking(int n, int i) {
    if (i > n) {
    return;
    }
    printn_1_backTracking(n, i + 1);
    cout

  • @user-ti3bd8mp1w
    @user-ti3bd8mp1w Před 11 měsíci

    understoood
    Thank you striver for such an amazing explanation

  • @ESaiCharanKNetha
    @ESaiCharanKNetha Před 2 lety

    Just started watching your recursion playlist

  • @aashritamutkiri5071
    @aashritamutkiri5071 Před 2 lety +7

    class Recursion
    {
    public static void main(String[] args) {

    int n = Integer.parseInt("5");
    printReverse(5, 5);
    }
    static void printReverse(int n, int num)
    {
    if(n == 0)
    return;

    printReverse(n-1, num);
    System.out.println(num-n+1);
    }
    }

  • @lakeshkumar1252
    @lakeshkumar1252 Před rokem +4

    def f(a,b):
    if a>b:
    return
    f(a+1,b)
    print(a)
    f(1,3)
    #thanks for the content

  • @FireGamerz-of6vv
    @FireGamerz-of6vv Před 4 měsíci

    Excellant getting confident day by day

  • @sunnybunny4395
    @sunnybunny4395 Před 2 měsíci +1

    if(i>n) return;
    print5(i+1,n);
    cout

  • @priyanshusaxena7157
    @priyanshusaxena7157 Před 2 lety +4

    // Use backtracking to print N to 1
    #include
    using namespace std;
    void print(int i, int N)
    {
    if(i > N)
    {
    return;
    }
    print(i + 1, N);
    cout

  • @sivaramapandiyan5117
    @sivaramapandiyan5117 Před rokem +3

    Question 5:- [Python Solution (BackTracking)]
    def printNumber(i,n):
    if(i>n):
    return
    printNumber(i+1,n)
    print(i)
    number = int(input())
    printNumber(1, number)

  • @abhaymishra8486
    @abhaymishra8486 Před 11 měsíci

    very good explanation i have cleary understood the concept of backtracking.😎

  • @pritampaul6747
    @pritampaul6747 Před rokem

    def backtrackNum1(i,n):
    if i>n:
    return
    backtrackNum1(i+1,n)
    print(i)
    backtrackNum1(1,3)
    Thank you so much, Sir.

  • @shubhamagarwal1434
    @shubhamagarwal1434 Před 8 měsíci

    Very nice explanation...God Bless You

  • @lalitbisht8381
    @lalitbisht8381 Před 6 dny

    Very nice choice of question to make the base strong❤

  • @ilovemusic465
    @ilovemusic465 Před rokem +2

    can you please make a video on deriving the time complexity and space complexity of a given algorithm?

  • @rishikeshmore5665
    @rishikeshmore5665 Před rokem +1

    void print(int i, int n){
    if(i>n)return;
    print(i+1,n);
    cout

  • @padmasrinivasanmanivannan

    def func(i,n):
    if(n

  • @thebackendcoder3147
    @thebackendcoder3147 Před rokem

    Great video Striver
    function print(i, n) {
    if (i == n + 1) {
    return
    }
    print(i + 1, n);
    console.log(i);
    }

  • @radharamamohanakunnattur3035

    Understood!! Awesome explanation

  • @shashankmishra484
    @shashankmishra484 Před 2 lety

    Does this mean dfs-prefix of BT is recursion and dfs-postfix is backtracking? What will infix will be then? Or is it like backtracking is basically fancy name for recursion, or does it have unique cases where we can differentiate between recursion and backtracking?

  • @EjazAhmed-pf5tz
    @EjazAhmed-pf5tz Před 11 měsíci

    def number(i,n):
    if n

  • @aneezahayatshaikh3176
    @aneezahayatshaikh3176 Před 2 měsíci

    Really very thankful to you sir, so well explained

  • @amruthaammu7463
    @amruthaammu7463 Před 2 lety +2

    Wonderful series

  • @Mr_kp66
    @Mr_kp66 Před měsícem

    Why we need two parameters to pass ?
    Instead we can use only one parameter by
    Void print(int i)
    {
    If(i

  • @user-js1rx8rs9p
    @user-js1rx8rs9p Před 3 měsíci

    thank you striver . you made my day

  • @hckermanrober03
    @hckermanrober03 Před 2 lety

    vaiya totally clear the basic recursion😍

  • @drishtirai864
    @drishtirai864 Před měsícem +1

    Thank you ! Understood :))

  • @technicalknowledge3929
    @technicalknowledge3929 Před měsícem

    amazing playlist of dsa it's like wow

  • @riyarsharma4667
    @riyarsharma4667 Před měsícem

    Thank You Striver!!

  • @siddhantgupta5301
    @siddhantgupta5301 Před 4 měsíci

    def back1(n):
    if n > 5:
    return
    back1(n+1)
    print(n, end=" ")
    back1(1)
    I am finally getting it, thankyou so much

  • @suyashpurwar631
    @suyashpurwar631 Před rokem

    For the last question
    void printNto1_backtracking(int n, int i = 1) {
    if (i > n) return;
    printNto1_backtracking(n, i+1);
    cout

  • @swarnabd202
    @swarnabd202 Před rokem +1

    Python implementation of print N to 1(using backtracking):
    def printNto1(lower,upper):
    if(lower==upper):
    print(lower)
    else:
    printNto1(lower+1,upper)
    print(lower)
    printNto1(1,7)

  • @TanishGupta-hw5gs
    @TanishGupta-hw5gs Před rokem

    In python(for python users :) ):
    def gg1(n,i):
    if n

  • @sarangkumarsingh7901
    @sarangkumarsingh7901 Před 5 měsíci

    Understood awesome.....

  • @raghavsinghal22
    @raghavsinghal22 Před rokem

    Striver's backtracking understood!

  • @Munchen888
    @Munchen888 Před 3 měsíci

    Thank you for good explanation and last hometask)

  • @artifice_abhi
    @artifice_abhi Před rokem +1

    All questions done
    Thankyou bhaiya bhot khushi ho rhi ye concepts finally smjh k
    #include
    using namespace std;
    void print(int i, int n){
    if(i>n){
    return;
    }
    cout

  • @CodewithKing360
    @CodewithKing360 Před 4 měsíci

    void print(i,N)
    {
    if (i>N) return;
    print(i+1,N);
    cout

  • @RahulSharma-di3rx
    @RahulSharma-di3rx Před 2 lety

    Thank you for the video with good explanation.
    In 3rd question, There is no need of 2 parameters. It could be solved using single parameter only. Even you have not used 'n' anywhere in the code.
    void printN(int N)
    {
    if(N < 1) return;
    System.out.println(N);
    printN(N-1);
    }

  • @sakshamnda4802
    @sakshamnda4802 Před měsícem

    void linear(int i,int n){
    if(i>n){
    return;
    }
    linear(i+1,n);
    cout

  • @Nishantkumar-oh9th
    @Nishantkumar-oh9th Před rokem

    For Printing the counting 2 parameters makes it complex .
    void fun(int n){
    if(n==0)
    return;
    cout

  • @chitrankusarkar7278
    @chitrankusarkar7278 Před rokem

    20:52
    ques 5
    void printNToOne(int i, int n)
    {
    if(i > n)
    return;
    printNToOne(i + 1, n);
    cout

  • @abhimanyukumarbharti2972

    You are great sir .....can you start comparative programing sir .... please .....

  • @akashpatel-jp4gh
    @akashpatel-jp4gh Před rokem

    Now today i understand the recursion concept

  • @jasmeetsingh5174
    @jasmeetsingh5174 Před 9 měsíci

    public class sec {
    static void f(int n,int i){
    if (i>n) return;
    f(n,i+1);
    System.out.println(i);
    }
    public static void main(String[] args) {
    int n=50;
    f(n,1);
    }
    }
    java approach for printing n to 1 using backtrack (thanks striver bro)

  • @aniketsharma472
    @aniketsharma472 Před 10 měsíci +1

    for Q5 in C++
    #include
    using namespace std;
    void num(int a,int n){
    if(a>n){
    return;
    }
    num(a+1,n);
    cout

  • @SJ_46
    @SJ_46 Před 2 lety +1

    Are the last 2 questions using 'backtracking' or simply 'head recursion' ?

  • @arnabdeb1486
    @arnabdeb1486 Před 2 lety +2

    #include
    using namespace std;
    void backTrack(int i,int n){
    if(i>n)
    return;
    backTrack(i+1,n);
    cout

    • @RohitRaj-hl6ji
      @RohitRaj-hl6ji Před rokem

      This code is printing the numbers or only i n times??

  • @dilipvaliya5301
    @dilipvaliya5301 Před 4 měsíci +1

    Print N to 1 using backtrack (C++)
    #include
    using namespace std;
    void print(int n, int i)
    {
    if (n == i - 1)
    return;
    // cout

  • @ravalikatalks5285
    @ravalikatalks5285 Před 5 měsíci

    thanks alot bhaiya for the best explanation!
    😊

  • @ganeshv045
    @ganeshv045 Před rokem

    Understood , super explanation

  • @AliceOberoy
    @AliceOberoy Před měsícem

    void print5(int i, int n){
    if(i>n) return ;
    print5(i+1,n);
    cout

  • @mayankchouhan458
    @mayankchouhan458 Před 2 lety +2

    20:51
    #include
    using namespace std;
    void print (int i, int n)
    {
    if (i > n) return;
    print(i+1 ,n);
    cout n;
    print (1, n);
    return 0;
    }

  • @ashanagar5226
    @ashanagar5226 Před rokem

    Thankyou so much just amazing explanation

  • @jayesh8401
    @jayesh8401 Před 2 lety

    Well explained 🔥

  • @pranavsinha1334
    @pranavsinha1334 Před rokem

    Damn Bro. W Teaching. Good Job 🔥🔥