Lecture 80: Longest Common Prefix Problem || Tries || C++ Placement Series

preview_player
Показать описание
In this Video, we are going to learn about Trie in C++ and Questions

There is a lot to learn, Keep in mind “ Mnn bhot karega k chor yrr apne se nahi hoga ya maza nahi aara, Just ask 1 question “ Why I started ? “

Questions Links:

Do provide you feedback in the comments, we are going to make it best collectively.

Connect with me here:

Telegram Group Link: Love Babbar CODE HELP

Intro Sequence: We have bought all the required Licenses of the Audio, Video & Animation used.

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

finished your 60th video today. Came here to show my support. Please don't be disappointed as the view are declining. Once we finished the other videos, we will come here too. This is the only comprehensive DSA PlayList available on YouTube. This is much much better than hundreds of paid courses.

md.ualiurrahmanrahat
Автор

Is it just me or with everyone that feels babbar bhaiya is exhausted but still recording the video
Bhaiya please take proper rest and then start the course again.
We need your full power !!!

vaidanshkukreja
Автор

Really Enjoyed this. However, one small check to be done for corner testcases:

//insert all strings into Trie
for (int i = 0; i < strs.size(); i++)
{
if(strs[i].empty()) // missing check to return in cases where the string is empty

return "";
t->insertWord(strs[i]);
}

Codex
Автор

❤💯 already solved trie construction in the morning today of leetcode both recursive and iterative approaches, both were right just by understanding the logic from you... so simple and easily understandable

human
Автор

bhaiya big fan
1 more approach :-
sorting karke first and last string compare karenge to ans mil jayega

string &arr, int n)
{
// Write your code here
if(n==0)return "";
if(n==1)return arr[0];
sort(arr.begin(), arr.end());
string ans="";
string a=arr[0];
string b=arr[n-1];
for(int i=0;i<a.size();++i){
if(a[i]!=b[i])break;
ans.push_back(a[i]);
}
return ans;
}

gb
Автор

Bhaiya, maza aarha h... Coding ab ho rhi h.. Leetcode ke questions bn rhe h..
Happy😁
Credit goes to you ☺

aaryannaugaraiya
Автор

Attandance ++
Consistency++
Thank you ++

inspiringzone
Автор

wahh sirr another an exciting session the second Trie mehtod approach giving TLE at submission time.... but first approach is optimal code solution for this problem...thanks sirrr...consistancy, respect, hardwork, dedication, passion

prashantbirajdar
Автор

Bhai saab, JOB + Consistency == Faadu 🔥🔥🔥.

do_not_want_to_show
Автор

maja aa rha hai .. previous day maine leet code, visual code, gfg se trise k question kara, easy and loving this lecture for me...tq bhaiya for this...

akashkumarmaurya
Автор

JAI SIYA RAM BHAI you are doing tremendous work

krishnaradhey
Автор

I am in recursion .... we all are with you

CODEWK
Автор

int n=strs.size();
string ans="";

sort(strs.begin(), strs.end());

string s1=strs[0];
string s2=strs[n-1];

for(int i=0;i<s1.size();i++){
if(s1[i]==s2[i])
ans+=s1[i];
else break;
}
return ans;


try this is very esay to understand t.c is 0 ms and s.p is 9 ms

Bad_Avadh
Автор

We can clearly see how much effort you are putting to provide us the quality content.
recording the video half asleep🙂🙂🙂 dedication level is ++
GURU JI ++

MohammadAmmar-jrsp
Автор

consistency vaps le aae ho bht ache bht ache

mr.himanshu
Автор

Your teaching is really Excellent,
very simple to understand

NinjaCoders
Автор

Jaldi complete krrao bhaiya, mid March ka promise kiya tha apne, abb toh mid Aprila aaagya !!

shrutijaiswal
Автор

Enjoyed a lot... Thanks for making such a quality content ❤️❤️

utkarshsingh
Автор

I am really really impressed with the way you teach. Thanks much. I have a question and I hope you wont mind revealing it. Actually I am really very curious to know that how long or how much time do you study in a day?

RavinderSingh-yodx
Автор

Back to form..U have given enough upcoming students..❤️

RajKumar-vqnm