Let's continue the habit of commenting “understood” if you got the entire video. Please give it a like too, you don't 😞 Do follow me on Instagram: striver_79
@chandannikhil85262 жыл бұрын
Bhaiya ek request hai "Evaluate division " wala ques bhi karana pls Ho nahi raha
@himanshu2982 жыл бұрын
Baaki log “Google” “Microsoft” ke name pe janta ka kaat te rahengey aur views lete rahengey. But ye banda apni mehnat consistency content quality se ek aisa level set kar jaega, jisse isko aane waali kai generations yaad rakhengi ♥️ Striver in real sense.
@codingwithanonymous8902 жыл бұрын
haan bhai true 2024 and 2025 batch ke liye toh gem hain yeh sab...paid course
@Anicienttimes2 жыл бұрын
agree
@artofwrick11 ай бұрын
Fantastic approach. I don't see any reason for interviewers to reject such a pretty backtracking algorithm
@mayurbhor2231 Жыл бұрын
I find this solution more intuitive than the previous one.
@sumedhakula71622 жыл бұрын
The smart DFS is such an IQ 200 move, Striver, thank you for sharing this with us!
@anvesh53772 жыл бұрын
Two months ago I submitted the python code for this problem and out of 7 submissions, one was accepted with barely 6000+ ms run time, and the others are TLE. But with this algorithm, it gave an average run time of 180ms for python. This much optimized algorithm. Thank you Striver.
@mohitsingh7793 Жыл бұрын
As he Said,it will be a cakewalk for a competetive programmer.Just got the goosebumps 😀
@muditkhanna8164 Жыл бұрын
this is not a cakewalk(in implementation) for us, probably for understanding its a cakewalk its like a 1600-1800 level question but it could go to 2000 if made some changes like find sequences only in lexicographical order
@Ahmed_Ataullah29 күн бұрын
Following you for the past few months and my problem solving ability has improved quite a lot. Thanks a lot.
@himadrinath150213 күн бұрын
bhai mena cf pa 2000+ question kar liya Google nikal jai ga na??
@tanyacse65772 жыл бұрын
That's reaally amazing man ❤🔥❤🔥❤🔥 THANK YOU for puting such amazing content , I just want to tell u that I follow your content DSA through out and I get internship in my dream company as a SDE Intern at Amazon. Thank you for putting such a amazing content for freee man really appericatiated 🙌🙌
@anishkarthik43092 жыл бұрын
could share your resume 📄? the one that got your intern at amazon.
@kaneframe53576 ай бұрын
It might be even better to store vectors of words for each level in an array/vector eg- [0:[hit], 1:[hot], 2:[dot, lot], 3:[dog, log], 4:[cog]]. Then we can go back from cog checking for words on level 3 and seeing if difference in letters is 1. Such a method only compares the words up to 5 time (max no of letters in these words acc to leetcode) instead of 26. It is also faster due to access in array instead of a map. Pretty amazing solution, specially for conservation of memory. Thanks Striver :) Edit: Just realized another thing you can do is build an adj list at the start, which makes the process much simpler.
@niteshverma82812 жыл бұрын
best youtuber for coding in the world ♥🧡🧡🧡🧡🧡🧡♥♥♥♥♥♥♥♥
@Dontpushyour_luck Жыл бұрын
First time I tried this problem, I did think of extending on the word ladder 1 concept by first calculating minimum seq length and then checking all sequences upto that length, probably that would have given me tle, this is a nice approach.
@subodhkasaudhaniitk796 Жыл бұрын
Yes that gave TLE
@Health_asset Жыл бұрын
I found this method best in between these two videos , first one was confusing , thanks striver sir
@shivankshukla25192 жыл бұрын
is this the end of this course. The way you make things easier is amazing. I THANK you for such helpful content creation, in every success of mine you are a great contributor.
@SaquibAnsariofficial01 Жыл бұрын
As a Competitive Programmer I find this solution the more concise and easiest though that dfs was really awesome
@imPriyansh778 ай бұрын
Yeah
@parallax8916 Жыл бұрын
Dude, I coded it myself after watching haldf of the vdeo and I found out the error u were talking about in 1 go!!! Thank u soo much bro for explaining soo tough problem in such a simple way!!!
@codinghustler67712 жыл бұрын
Hey striver, first thank you for creating such great series for us. We love you so much. Because this is a graph series so we can discover a graph way of solving this problem. Convert the input into a unit weight undirected graph and then we will be able to find the solution using all paths using dfs solution. I have checked that by running on leetcode. Again thank you so much guruji.
@jayant-baid2 жыл бұрын
Can you please send the solution
@artistyashwardhan89954 ай бұрын
after reading your comment i thought about this and came up solution, but this is giving TLE, it will be great help if you can share your solution. class Solution { unordered_map mpp; vector ans; string ew; private: void dfs(string word, unordered_map adj, vector& seq){ if(word == ew){ if(ans.size() == 0){ ans.push_back(seq); }else if(ans[0].size() >= seq.size()){ if(ans[0].size()>seq.size()){ ans.clear(); } ans.push_back(seq); } return; } for(auto it: adj[word]){ if(mpp[word] + 1
@TrendyGamer0072 жыл бұрын
this is real content and that tooo for free..... striver can you make a compitative programming playlist from beginner level to advanced just like this one .... can't find any on youtube🙂
@sonit9707 Жыл бұрын
The thing about cp is you will never find similar patterns of problems like you do on leetcode.
@lakshsinghania Жыл бұрын
@@sonit9707 true
@lakshsinghania Жыл бұрын
u need to explore yourself by trying out lot lot lot of problems on cf,cc,sj etc and learning tricks for solving them
@prayasgautam95952 жыл бұрын
This ain't no hack...you just need to be too smart to pull it off. Hats off Striver !!!!!!!!!!!
@noobCoder26 Жыл бұрын
thanks Striver , I am learning the whole Graph from your awsome series ✨✨
@dhruvsolanki447310 ай бұрын
Very amazing explanation.
@neymarfan4023 Жыл бұрын
Bro now way I am solving this question in a 45 min interview using this techinque lol. Altho I might as well learn for cp
@AshwinHarish-u4t Жыл бұрын
Thank you for the great explanation sir Sir, can you please tell me why this approach should not be used in interview??
@akshayanm Жыл бұрын
I've never seen a question like this before. It feels great to submit this solution
@pulkitgupta669 Жыл бұрын
Thanks Striver. Understood. I have recently started competetive programming so I want to understand this approach. I am learning a lot.
@atulwadhwa1922 жыл бұрын
Surely deserve a like on this brilliant explanation tho I'm not in cp much but understood every bit of it.
@stith_pragya9 ай бұрын
Understood............Thank You So Much for this wonderful video.........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@idlegaming1 Жыл бұрын
this approach is easy understandable then previous one
@yashshukla1637Ай бұрын
really great concept. must know for your google interviews.
@pulkitjain51592 жыл бұрын
amazing approach , found new way of approaching a problem. Thank you Bhaiya!!
@tejpratap90512 жыл бұрын
Hey striver, when will you upload the next set of videos, I'm eagerly waiting.
@Ankit.yt_8852 жыл бұрын
Bhaiya Amazing content ! Baaki ki videos kab tak upload hojaegi can you please tell an expected date?
@coding8000 Жыл бұрын
I am ready to help and die for you till my last breath, you are my man
@saranghae37202 жыл бұрын
U never failed to amaze me 🌻 P.S Just Striver things
@TechieClasher6 ай бұрын
Hey striver, The link to this video is not given in the atoz sheet, the world ladder I video link itself is given for word ladder II video. Thanks for the content.
@cinime2 жыл бұрын
Understood! Another super amazing explanation as always, thank you very much!!
@crazyduniya128 Жыл бұрын
ohhh!! mera to dimag hi hil gya 🤯🤯
@ashutoshanandsharma0072 жыл бұрын
Waiting for the new videos of this series❤. I hope you will upload them soon.
@appleinc.2325 Жыл бұрын
love you sir, you are the real saver for us. 🤩🤩
@Rajat_maurya2 жыл бұрын
Any update for videos delay bhaiya?
@dhirajsonawane37202 жыл бұрын
sir ji sabse jyada wait apke next video ka horaha hain. I hope it will come soon
@Werewolf568411 ай бұрын
I would not recomend to skip this, specially when you are preparing for Goolge
@visheshkaran70832 жыл бұрын
Understood😇
@gsmdfaheem2 жыл бұрын
Bhaiya new videos kab aayengi? Eagerly waiting....
@gangsta_coder_122 жыл бұрын
Understood 🔥🔥🔥
@anandA3b Жыл бұрын
this was actually easier than the first approach
@imPriyansh778 ай бұрын
yes, & the logic of starting from endWord towards the beginWord is also helpful..
@Saurav_Kumar5142 жыл бұрын
Just Wow 🔥🔥
@bhanupratapsharma61582 жыл бұрын
bhaiya iske baad next series kiska hoga toda cp ka bhi topic daal do segment tree ya cp sheet which help alot
@vikaskumar50662 жыл бұрын
Ha bhaiya
@vikaskumar50662 жыл бұрын
Jaise cp sheet
@vikaskumar50662 жыл бұрын
Ya string suffix
@aadipaadi91462 жыл бұрын
Ha bhaiya cp sheet yaha to samjh aa jata leetcode ke vhi ho jaate hai magar codeforces ke nahi hote Phir problem aati hai cp sheet
@rinaksharma75962 жыл бұрын
Cp sheet is best in which topics with question are seperated
@balakrishnanr6482 жыл бұрын
understood, but please say the time and space complexity also. Is it O(N*M*26)
@Yash-uk8ib Жыл бұрын
Sir, for dfs part, instead of changing character, u could have simply traversed 9n decreasing min value... again saving time and space.
@chinthalatejeswarreddy102610 ай бұрын
In the base case of recursive function dfs we need to add a condition that what ever the sequence that we are getting it has to be the same length of the sequence that we had at the first sequence in the ans vector
@imPriyansh778 ай бұрын
No, it's not required, we are adding elements in seq vector only when they are present in the map & are of one small level than the word from which they have been transformed
@shivam-shah Жыл бұрын
Correct me if I am wrong but isn't this question using dynamic programming in graph and using the same technique like printing the longest increasing subsequence problem in DP .
@lucygaming9726 Жыл бұрын
I thought so too. Looks exactly like LIS, but here we are not simply decrementing level and iterating over map.
@ITSuyashTiwari3 ай бұрын
i loved the solution
@guptafactory Жыл бұрын
Instead of reversing the Sequence vectors in last DFS call, we can reverse it just before return of Ans. for(vector &vec : ans) reverse(vec.begin(), vec.end()); return ans;
@beinghappy92232 жыл бұрын
In C++ it is always private by default , why do you write private everytime ? Is it related to some good code practices?
@imPriyansh778 ай бұрын
Yes, you're right that private is by default. He is writing private, as he is showing how to write a code in an interview. Writing industry level codes in interview is good
@tanaysingh53482 жыл бұрын
can't praise you enough
@Chandraprakash-kx4ic2 жыл бұрын
step_1 time 2:08 step_2 time - 5:46 why did this code run and not the previous - 11:32
@vaibhavagarwal2421 Жыл бұрын
this is more intuitive to me than storing vector of strings in a queue
@imPriyansh778 ай бұрын
Yeah
@aaaaz424 Жыл бұрын
Striver! I have a genuine question. I am a working professional. What is the upside of doing competitive programming for those who are already working? Should I focus more in development ?
@UECAshutoshKumar Жыл бұрын
Thank you sir 🙏
@vakhariyajay22242 жыл бұрын
Thank you very much. You are a genius.
@ritikshrivastava94429 ай бұрын
one question = while erasing we are checking if(st.count(word)) means the word should be present then only erase, let's say we erased endWord, and now for calling dfs we are checking endword should be present if we have already erased it while pushing how it can be present beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log","cog"] do dry run for this
@VishaliniT-f3g6 ай бұрын
Understood 😊
@abhishek__anand__ Жыл бұрын
Great Explanation
@mrtuyiop7 ай бұрын
What if we wanted to wanted to find only one possible combination in best space complexity
@AbhavGoel Жыл бұрын
in the dfs fucntion cant we iterate over the map and look for the words with one step less than current word and apply dfs on them. It would reduce the computations for trying all words in the dfs
@lucygaming9726 Жыл бұрын
We can't because we have to figure out the right sequence. Look at the example he gave and try this once.
@Rajat_maurya2 жыл бұрын
Sir code not working only 32 out of 36 test case are passing?
@RitikRaj-we2sc2 жыл бұрын
i am not able to understand one thing, that why previous solution gave TLE, because there too we were trying all the possible combination of word, and same is being done here. Someone please explain this.
@ApoorvBedmutha6 ай бұрын
This guy is my god
@noobCoder26 Жыл бұрын
i dont know why I felt this approach slightly easier than earlier 🎃🎃
@GyaanGrave2 жыл бұрын
preparing for interviews only but still watched it out of greed for problem solving ability even after you telling not to watch it 😎
@rachit29822 жыл бұрын
Please make a video solution on word wrap problem given on gfg and please explain both solutions (space optimised and brute force)
This one seems more intutive for me, but y shld i not say this in interviews?
@piyushgoel3020 Жыл бұрын
thank you striver
@suryakiran2970 Жыл бұрын
Understood❤
@The_Shubham_Soni Жыл бұрын
UNDERSTOOD.
@anonymous-ms2en2 жыл бұрын
@Striver bhaiya os,dbms and oops topics ki bhi playlist bna do plzz
@vaarigupta6332 Жыл бұрын
I think that the optimized approach is better than this one. This seem to be bit complicated but the optimized approach seems to be an extension of word ladder 1 so that seems to be good approach than this one.
@prathamsharma4416 Жыл бұрын
Striver, a big W
@p38_amankuldeep752 жыл бұрын
understood❤❤❤
@suhasdevang93322 жыл бұрын
striver brother pls make a video about when the top tech company hiring start in 2022 and some tips to get shortlisted... please brother
@sakshisinghal16692 жыл бұрын
Hey @Striver can you also cover floyd warshall?
@takeUforward2 жыл бұрын
I will.
@Learnprogramming-q7f8 ай бұрын
Thank you bhaiya
@ADITYAKUMAR-tb4gm2 жыл бұрын
understood
@madhurgupta42202 жыл бұрын
Understood !
@bhavya8608 Жыл бұрын
understoodd!!!
@nishantdhamija28802 жыл бұрын
Understood how many more videos of this series
@HimanshuGupta-ni3pk2 жыл бұрын
Yeh kon sa series ka hai ?
@nishantdhamija28802 жыл бұрын
@@HimanshuGupta-ni3pk graph
@krishanpratap32862 жыл бұрын
Maja aa gaya bhayiya us*3
@ayushjain3862 жыл бұрын
Next videos kb aari hai ?
@gametech70462 жыл бұрын
Bhaiya union find pe videos nahi aengi kya? Mene A-Z sheet check kiya lekin usme Union Find covered nahi hai 😔
@harshdasila66802 жыл бұрын
bhaiya saari videos aa gyi h ya abhi aur baki h??
@valarmorghulis9244 Жыл бұрын
Bro Can we not show this solution in an interview. It seems to be more easily explainable then the previous one.
@vishichaurasiya4427Ай бұрын
15:08
@edu39562 жыл бұрын
What's happen? Why not uploading bro?
@GauravKumar-by1yt2 жыл бұрын
Understood
@KratosProton2 жыл бұрын
great
@ashutosh.. Жыл бұрын
What's the cp thing in this?
@yashshukla1637Ай бұрын
One notes added
@amiteshshekhar6012 жыл бұрын
when will you start uploading videos for dsa from starting