Display Array in Reverse using Recursion | Algorithms in JAVA | Recursion Playlist

preview_player
Показать описание

NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the solution where we are required to display an array in reverse using recursion. In this problem,

1. You are given a number n, representing the size of array a.
2. You are given n numbers, representing elements of array a.
3. You are required to print the elements of array from end to beginning each in a separate line.

#recursion #algorithms

Рекомендации по теме
Комментарии
Автор

thanks alot sir u r life saver to all the students. but where r u now we haven't heard about u from a long time.

satyamgupta
Автор

sir jesa aap pdhate ho hame lachar patchar stack bhi bda sai lgta now need to improve anything .

vipulkumar
Автор

I was stuck in recursion and had seen many videos related to recursion but after watching your videos now my concept is clear, thank you so much sir for this great content.

anjulatakashyap
Автор

Watched on 15 October, 2021 - Thanks for the video.

raj_kundalia
Автор

Your method of explaining the questions as well as there solution is too good, you should get much more appreciation then this, I have gone through various courses, i took coding ninja's as well, but the amount of time and efforts you are putting, No one can put. Everyone must join pepcoding
hats of to you sir.

jyoti
Автор

other yt channels wale kuch bhi pada rahe smjh aaye ya na aaye unke millions of subscribers hai
aur sir jo itna badiya pada rahe hai unke bs 63k
most underrated channel

ritikshrivastava
Автор

The shape of the stack drawn by you doesn't matter as your explanation is worthy enough to analyse the problem.

vrindasharma
Автор

ap bhot ache se explain krte hai sir sare concept !! ap free me itna acha content provide kra rhe hai may god bless you sir!! I wish apke jldi se million of subscribers ho jae :) or apki bate to bhot hi achi hai.

reevarastogi
Автор

sir you dont need good writing as you have excellence teaching skills🔥

atulsharma
Автор

Awesome sir, pls full recursion daal dena aur backtracking:
Paths in maze (all directions)
Coin change, path sum etc etc and dp also.
Subscribers increasing very fast i subscribed at 500 subscribers!!

coderguy
Автор

After watching sumeet sir's video now i get to know that why nishant chahar got placement in Microsoft.

yashsoni-mfcd
Автор

Line lachar pachar hoti hai to ho jaani chahiye magar concept nahi 😊

thesafdarkhan
Автор

My solution:-
public class Main {

public static void main(String[] args) throws Exception {

Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] arr = new int[n];
for(int i=0;i<arr.length;i++){
arr[i]=sc.nextInt();
}
displayArrReverse(arr, arr.length-1);
}

public static void displayArrReverse(int[] arr, int idx) {
if(idx<0){
return;
}

displayArrReverse(arr, idx-1);

}

}

checkmate
Автор

Sir aap bahut mast ho hand-writing ke chakkar na padiye aap padhate ho bahut achha ho vahi chaiye hume bas

sandeepsharma
Автор

are sir handwriting mai kya rakha hai
thedhe lino mai to feel hai

alfiyazahra
Автор

Sir you need to seriously work on advertisement. Logon ko pta nhi hai pepcoding ke baare main isliye vo coding ninjas walon ke yahan phas jaate hain. Aapke aur unke content main zameen aasmaan ka fark hai. Aapki teaching capabilities exceptional hai bss thodi achi level ki advertisement prr kaam kijiye taaki coding ninjas jaise thug aur lootere students ko naa loot ske

jatinbhatoya
Автор

sir isse pre call se bhi kr kste h

// displayReverseaarray(arr, arr.length-1);

public static void displayReversearray(arr, int idx){
if(idx==-1){
return;
}
System.out.println(arr[idx]);

displayReverserray(arr, idx-1);

}

FirstLearningthanEarning
Автор

Ruler se straight line draw kar sakthe hai, i dont know jho aap use kar rahe ho usme hai ki nhi but Microsoft Whiteboard me zarur hai, and it has many other features too, aap try kar sakthe ho.

yoyo
Автор

You can use microsoft whiteboard to draw straight lines and write anything :)

shravankumarshetty
Автор

Sir lagtaa aap Mahabharat ka Krishna character sab padh liye hein

pritampadhan