Ep5 - Using recursion, check whether a string is a palindrome or not | DSA series

preview_player
Показать описание
To check whether a string is palindrome or not is very easy. You can do this question with the help of the FOR loop, but in this video, we will learn how to do this with the help of recursion. Now you might ask, why are we doing this when we already know one method? These basic questions will help you build up your strong base for the harder problems. So don't skip these videos and share them with your friends too. 

To get all updates follow on Instagram

👨‍💻Utilize free courses, DSA sheet, and articles on Lead Coding website at

Join our telegram channel for all the important announcements

✨ Hashtags ✨
#DSA #Recursion #Placement #Fraz
Рекомендации по теме
Комментарии
Автор

Day 5 Done ✅

Congratulations Guys, if you are consistent from last 5 days because 5th & 10th day are the most difficult day of consistency ⚡ By the time you'll reach 21st day you will be champ. 👑 Hope this motivates you all❤😊

iamdhirajshastri
Автор

Points -
1. Basic solution is to use two pointers from middle, from ends OR reverse the string.
2. In recursion, we will only take the loop and convert it to recursion. i.e. we still will have left and right end chars in same call (and not have some mechanism to store and compare in appropriate number of call). L and R represent the substring which needs to be checked for substring. [hence the 0 and n-1 initial values as we need to check whole string at first.]
3. Since, we return boolean as final answer, we will return true/false in base and invalid cases (here base case is a valid case). For Induction step(where we make next call), we don't need to take and/or since this is a Unary recursion tree.

*Note - Recursive solution is "inferior" to iterative solution in terms of space complexity (expected due to stack)

AbhishekVerma-evtv
Автор

I have solving palindrome problems using loop, today i learnt new thing that we can solve it using recursions as well. thanks bro.

gouravmehra
Автор

One small suggestion Fraz bhai ..!! The logic explanation is superb.! In one go I am able to understand. It would be good if you can explain the code also so that it will be easy for us to understand and this helps us to explain to interviewer also in much smoother way. Because these days interviewers are preferring the explanation of code which we write. I know it might look silly suggestion but it helps us a lot.

naveenh
Автор

You are hard working for us until finish this series I will never give up
I will watch your daily lectures and be consistent

bhupendrasingh
Автор

Sorry for the late Fraz bhaiya. But EP 5 is DONE. Thank you for your consistency and I always appreciate you for your 0 to pro
type content.

productivewind
Автор

The way of explaination is mindblowing. Keep it up.

krishnakakade
Автор

video best like previous.n/2 is write because there is 0 to 4 and all i assumen .baki no doubts.ur videos is like 6 baj gaya aaaj ka video chalo kar lete hai .im student .but ik working professional ke liye ye daily challange time ki waje se kaffi accha lag raha hoga superb bhaiya.consistent op

dipeshjoshi
Автор

the simplest explanation ever.. loved it.

amarnathbarpanda
Автор

bhai bht acha kaam kra h ....lots of love :)

vaishnavirathore
Автор

With this course, you are giving us more than DSA lessons
You are teaching us discipline perseverance and to show up every day no matter what(which will stay for life)
Thank you so much bhaiya♥

souvikmukherjee
Автор

A small request Fraz to cover more in one video and also plz dry run the code for a few cases. Gives loads of insight like in last video you did ♥️♥️!!! #missionamazon

piyushsrivastava
Автор

Eagerly waiting for the video daily same as i used to wait for a show on TV in my childhood😄😁

mohitroshan
Автор

I think we should increase pace of this course its just a suggestion and you know better than me fraz bhaiya
thank you

aakashbhargava
Автор

Bhaiya lectures are really good. Like as a beginner I am understanding this recursion series very well but pls suggest how to gain confidence over topic of time and space complexity

ismitsingh
Автор

I always do the problem using iterative solution 😂 learnt the recursion approach from this video. Thank you so much for hard work and regularity. Keep on doing that, enjoying so much big bro ❤️❤️

anirudrabrahma_
Автор

Provide assignments for practice daily. This will help everyone.

Shorts-scis
Автор

you are one of the best teacher keep uploading videos brother...

darshankalathiya
Автор

Yeah, now catch your speed.. Feeling confident. 👍

sahapritam
Автор

Day 5 completed
Please give more questions for practice and homework

hiiiiiiii
visit shbcf.ru