This is high quality for a KZbin channel on CS. Great Job from the US.
@hetaeramancer3 жыл бұрын
@@sohamshinde1258 he said he's from the US
@sayantanmondal86303 жыл бұрын
All are INDIANS
@Ppu_for_a_reason10yrs6 ай бұрын
@@hetaeramancer 😂 he wasted his time on Duolingo.✅
@HosBarGamers3 жыл бұрын
I have never found such a channel that is so good at explaining CS stuff. Great job.
@aradhanasoni66164 жыл бұрын
I've never seen any sir as you explain about C language. You're the God of C. Love you sir 😍
@RiseWithShivam3 жыл бұрын
Ya, He is God of C😍😍
@name-iq7on11 ай бұрын
Bro where were you this whole timeeeeee,,, is your words are magic or what ,, why am getting your explantion straight in my brain ,,, seriously bro u made my thinking better ,,, where so many were eating my brain, also i m in love with your explanation, the way u r explaning is incredible.
@saifulislamsarfaraz5 жыл бұрын
one day there will be billions of viewers in your tutorial
@sarfaraz65825 жыл бұрын
it should be but people ain't too much interested in studying unlikely they are busy unnecessary drama..
@Dnsx_plus4 жыл бұрын
@@sarfaraz6582 You got a girlfriend?
@fortnitelove81294 жыл бұрын
Don't waste time in bf or gf or any other human being, invest only on YOU
@Dnsx_plus4 жыл бұрын
@@fortnitelove8129 yeah forreal
@hetaeramancer3 жыл бұрын
not really billions, but several millions!
@MrTomro6 жыл бұрын
Amazing, I like the stack diagram, helps u visualize the whole process
@sanjaykarthicks12263 жыл бұрын
I really like NESO ACADEMY ❤️ It's really effective for me while preparing for my C paper in sem2 Thank you so much sir for your lectures
@surbhitamrakar16384 жыл бұрын
Thank you so much sir for this series.I found recursion very hard before I watched your lectures..but now I am comfortable with recursion. Thanks alott.
@matematleta4922 ай бұрын
Best explanation of this material on YT. Thank you!
@piyushji23124 жыл бұрын
One of the best online playlist to learn recursion . Sir please if you could make a series on backtracking and dynamic programming as well. _/\_
@FarhanAli-gd2qv3 жыл бұрын
I totally agree with you.
@enjoylearning2103 жыл бұрын
Background music at last really motivates me 😊😊 and indulge myself in that thought ..I have achieved something , it's just becoz of ur awesome video series ...really best 👍 . Not so long and not so short , perfect one
@yusraabdullah82612 жыл бұрын
Now I subscribe your channel for giving us a beautiful example of indirect recursion..... Very beautifully explained...... Now my concepts are clear ❤️Thanks sir..... You deserve millions likes.... And you'll get soon
@accessdenied93933 жыл бұрын
Example in same factorial function indirectly: [Fact() can calc the factorial of at least 20 and -20, if you calc fact(21) or fact(-21), this will exceeds the range of long integers, and thus you ended up with wrong results] long Fact(int a) { if (a > 0) return posFact(a); else if (a < 0) return negFact(a); else return 1; } long posFact(int a) { if(a == 1) return a; else return a * Fact(a-1); } long negFact(int a) { if(a == -1) return a; else return -a * Fact(a+1); }
@kesavae95523 жыл бұрын
Mission accomplished, respect++
@anchalagrawal43324 жыл бұрын
Sir you explained it very well . nobody can explain like this 👌👌👌👌
@bruhmetsaiharnet65953 жыл бұрын
Thank you,God bless you
@pariminagalakshmi55174 жыл бұрын
sir,thank you soo much .... these videos are very helpful for many students like me.. once again thank you soo much sir...
@mani_vk_294 жыл бұрын
Answer for homework problem is 15. Thank you
@Adityasharma-oe8zp3 жыл бұрын
I've done the same question like this Int a=1; Void main() { Void fun(int); If (a>10) Return; If(a%2!=0) Printf(" %d",a+1); Else fun(a); a++; main(); } void fun(int b) { printf(" %d",b-1); a++; main(); }
@hetaeramancer3 жыл бұрын
what's the output?
@Adityasharma-oe8zp3 жыл бұрын
@@hetaeramancer output is same as in the question.... I've tested it after that i posted it
@batsmanist Жыл бұрын
Thank you for this class. It opened my mind to a hard task I was doing.
@MorrowSind6 жыл бұрын
Nice and very well explained.
@rileshkhatri12093 жыл бұрын
Since we are using tail recursion here with void function we don't really need the return statement.We will still get the same output even without a return statement
@sujoymollick12393 жыл бұрын
Amazing. Go on.
@manoharsinghrawat18592 жыл бұрын
Very awesome lectures 👌
@zeshanmushtaq52956 жыл бұрын
Love from Pakistan thanks too much sir g
@rizwanriaz75956 жыл бұрын
Excellent
@sajadulislamdipu19544 жыл бұрын
Thanks sir ❤❤❤
@mohandask13282 жыл бұрын
if we are not using recursion, the same output can be get by....... int fun(int n); int main() { int i; for(i=1;i
@basavaraj95902 жыл бұрын
This one is which problem Bhai.. print o/p upto from 1 to 10 numbers
@Vinay_singh016 жыл бұрын
GOOD sir
@arghyasaha837010 ай бұрын
Great explanation❤
@raktimagupta96059 ай бұрын
your voice >>>
@nityanandrai53415 жыл бұрын
a very simple code for above question #include using namespace std; void fun(int n) { if(n==0) { return; } fun(n-1); if(n%2==0) cout
@iluvyunie4 жыл бұрын
Wow. This is really helpful
@chandanpurbey10585 жыл бұрын
Well explained.
@Karan_mahra6 жыл бұрын
Respect....
@nikhilguleria43132 жыл бұрын
it's wonderfull explanation
@mipa38682 жыл бұрын
wow..amazing sir at 5:04...in cases like these ...will post increment operator not be a problem?
@anirudh46923 жыл бұрын
that's neat and clear...gud job
@shashank68035 жыл бұрын
By direct Recursion it looks like public class Print { public static int calculate(int n) { if(n>10) { return 0 ; } if(n%2==0)//even { System.out.print(n-1+" ") ; return calculate(n+1); }else{ System.out.print((n+1)+" "); return calculate(n+1); } } public static void main(String[] args) { int n=1 ; calculate(n); } }
@compangit1524 Жыл бұрын
Comment for myself: 1st step is find the recursive flow, 2nd step is find the base case. The base case is the case that doesn't need to call the function itself again.
@-HarishkumarG3 жыл бұрын
you are the best
@kushalavardhan3 жыл бұрын
in the user defined functions, we wrote If statement and we related values of n and 10. here, what does n mean??? there is no definition of n in any of the functions. in global scope (if compiles goes out) n value is "1". how each function call remembers the value of "n"??
@stranger55486 ай бұрын
Same doubt pls ans
@sabreenparween96964 жыл бұрын
Really osm concept😍
@sayyedaaman57192 жыл бұрын
Amazing video thank you for explain it
@tanishajaiswal75594 жыл бұрын
You made it seem so easy
@cheery34698 ай бұрын
Omg...where i was... thnk u
@HelloWorld40408 Жыл бұрын
Thank You sir
@anurani5485 жыл бұрын
Very nice explanation
@daverussell40523 жыл бұрын
you basicly dont need the return because void functions is a non-return functions
@juliuskamara13482 жыл бұрын
Thank you very much. Do we still return statement for void return type?
@harshvardhananand87955 жыл бұрын
Nicely explained
@TehreemAyesha4 жыл бұрын
What would have happened if there was pre increment in place of post increment?
@ritikshrivastava94424 жыл бұрын
If somebody wants to know the same program without indirect recursion 👇 int main() { for(int i = 1; i
@codemonster82403 жыл бұрын
realy helpfull
@b.himanshu26544 жыл бұрын
Superb
@rohanghosh97005 жыл бұрын
Sir ouput should show in opposite order because it was in stack
@sasikumartangala50015 жыл бұрын
Sir for this programme we need to write the even and odd logics right
@nitinadarsh4 жыл бұрын
No He just initialised the variable with n = 1, and after that it falls in the odd function and we increment the value and send it to even function. So no need to write logic for odd and even.
@educationalonly59413 жыл бұрын
No ,here we have declared no. From 1(kept in odd fun.) sequentialy no. is incriminating in function itself. Then Obviously the next no is of even type and next odd and so on .
Then what is significance of writing "return 0" in main function?
@binoyabraham45594 жыл бұрын
in this program we should return (n) right ?becoz i learned that only a variable which is declared in a function ......only that function can access to it ...if u want to access in other function u have to return it na
@swarajchoudhary18623 жыл бұрын
Over Here how after decreament in even function the n value increases by 2 ?????
@ReflectingOurselves3 жыл бұрын
#include int i; int main() { for(i=1;i
@JathinShyam3 жыл бұрын
In the void functions, why u typed return?
@jeevaalok14673 жыл бұрын
Yea I too have same doubt
@mdkaiserali68305 жыл бұрын
awesome
@Hell20263 жыл бұрын
You are an outstanding explanation sir but what you have written is that syntax or example? Please give me reply sir
@jeevaalok14673 жыл бұрын
Example ig
@bsaikumarreddy14136 жыл бұрын
Please upload video fastly sir It’s a kind request
@sudhanshuranjan76296 жыл бұрын
By what date should we expect next lectures?
@tomcruise66184 жыл бұрын
Sir why is void used before function??
@fasasiwasiu75332 жыл бұрын
In video 76(How to write Recursive Functions) you mentioned that if block only should contain Base Case, while else block should contain Recursive Procedure. But in this video, your if block contains Recursive Procedure, while your else block contains Base case. Please can you explain what happened here, thanks
@juliuskamara13482 жыл бұрын
I think hence the base case is been define, doesn't matter whether in an if or while.
@CSEEswarGuptha4 жыл бұрын
In function defination why we are using void odd,void even
@jeevaalok14673 жыл бұрын
Same doubt
@knSharooq4 жыл бұрын
is it necessary to use return; ??? if it is not used then also result will be same right??
@manavjain39305 жыл бұрын
Man jae sir
@compangit1524 Жыл бұрын
Comment for myself: Indirect Recursion happens, when the recursion doesn't only happen on the function body alone of the function caller.
@educationalonly59413 жыл бұрын
how the return; works? Pls. Explain..
@asha05236 жыл бұрын
Mast
@sahil_singhai2 жыл бұрын
Why we have declared int n =1; in a global variable or not as an inside main function?
@cuteonigiri1671 Жыл бұрын
because if not, it will only be available in main function. unless u use call by reference(pointer).
@eve77222 жыл бұрын
Hello when we return value why void came instead of that int may be come
@M4LICIOUS2 жыл бұрын
You sure WAP is 'write a program"?,lol🙃
@johnychinese Жыл бұрын
I came looking for this comment 😂
@الكليةالتقنيةالهندسيةفيميسان6 ай бұрын
how to transfer (n) between odd and even ??? odd()>>>even()!!! how each function call remembers the value of "n"??
@mickey5280Ай бұрын
Can someone explain to me why don't he use void not if else?
@sahilsaxena83745 жыл бұрын
Void odd() It's return how it is possible Void means it's doesn't return???
@bantuthakur99595 жыл бұрын
Hey odd and even function not return any value, it only print on its own function but doesn't return any value.
@sahilsaxena83745 жыл бұрын
Why we write return statement??
@bantuthakur99595 жыл бұрын
@@sahilsaxena8374 to return some value to the function
@rishabh70114 жыл бұрын
@@sahilsaxena8374 to stop the execution of that function and return to previous function
@HarshaVardhan-kt5uu3 жыл бұрын
Nice question 👍
@HARE_KRISHNA_23995 жыл бұрын
But how does the compiler know that which is odd number and which is even ??
@georgiilkov99153 жыл бұрын
A bit late here but we start with 1 which we as humans know is odd. So we make it call odd() first.The number after an odd number is an even one. After an even number follows an odd one. And so on until we reach 11
@jeevaalok14673 жыл бұрын
compiler knows some inbuilt functions ig
@jonasasare57754 жыл бұрын
We are returning an integer to the main fun but why is the data type of odd fun and even fun void
@johnychinese Жыл бұрын
WAP == Write a program Everybody knows that 😂
@jayaprakashl8592 Жыл бұрын
in the even function, the if condition and the return statement are useless.
@ameykulkarni81653 жыл бұрын
are those types applicable in java?
@FarhanAli-gd2qv3 жыл бұрын
What if we do not write return; statement in even and odd function. I didn't write it in my program and I didn't got any type of error. Program executed properly. What if we do not use it or is it necessary to use, if yes then why?
@bablu19213 жыл бұрын
Because we're using a void data type so it doesn't expect anything in return
@FarhanAli-gd2qv3 жыл бұрын
@@bablu1921 I know that but what about int return_type in function header. I have typed int in function header and didn't typed return statement inside function at the last and didn't got any error in the program. According to rules function must return an integer value if int is written in the function header.
@bablu19213 жыл бұрын
@@FarhanAli-gd2qv probably your compiler is smart lol Well then I can't say
@FarhanAli-gd2qv3 жыл бұрын
@@bablu1921 you can try it too in the visual studio code.
@FarhanAli-gd2qv3 жыл бұрын
@@bablu1921 I searched about this issue over stack overflow, over there a user said "it's ur choice whether you want to put it or not". But I need the reason. Why program is not generating any error ?
@CostaKazistov5 жыл бұрын
Is it the same as Trampoline function?
@hetaeramancer3 жыл бұрын
what's that?
@b3nythomas28411 ай бұрын
I wish i thought of WAP as write a program...
@sumitchettri83994 жыл бұрын
if we are already incrementing the value of n in the printf function then why are we incrementing it again??
@FarhanAli-gd2qv3 жыл бұрын
incrementation of n variable in both functions are necessary.
@FarhanAli-gd2qv3 жыл бұрын
Dry run your program then you will get to know.
@indianmusic17703 жыл бұрын
Why do you not execute the code
@anoliverma49072 жыл бұрын
Why is only odd function called in the main function? Why Even function is not called?
@vallimaylvalliappan94894 ай бұрын
isnt it dynamic scoping then?
@venkythesmart4404 жыл бұрын
so many member doubts this. Please reply me. Stack flowed only last in first out. This program not follow that. Return function how it is works. This I am not felt this recursion program
@udbhavvikramsingh34493 жыл бұрын
Can we write even (n++) instead even ( ) And not write n++
@jeevaalok14673 жыл бұрын
Yea it works
@shovonanand023Ай бұрын
But i didn't understand how it knows that it's odd or even. No you didn't give any condition either.
@omarboug6813 жыл бұрын
is my code right to ? it worked by the way int fact( int n ) { if( n % 2 == 0 ) { return n - 1 ; } else { return n + 1 ; } } int main() { int n = 1 ; for( n = 1 ; n
@radha_preymi3 жыл бұрын
🥰🥰🥰💚
@geekyskill41563 жыл бұрын
sir it is not working it programe goes to infinity