Solution of all question This is the solution to all the questions asked in class today. // * Minimum characters to be added at front to make string palindrome // ~ Method 1 : Using LPS algorithm #include #include #include using namespace std; int main() { string s; cout
Ekdam acche se chamak gaya bhaiya. Your teaching style your dedication is unbeatable. The way you teach, the way you focus even in little thing so we can understand the problem well is on top. I really salute you. Your are a game changer. Really appreciate your hard work.
bhaiya sb kuch chamak gya hai aache se thankyou bhaiya for your hard work for students bhaiya aap sare topic itne easiy way me padhate ho ke pta he nhi chalta ke yeh itne hard topic hai
bhaiiyaa i had another idea for circula string matching yours is simplified!! but i want to do it like this first i am going to take str1 and reverse and add it the find lps for it then find where the prefix suffix is equal and then take that string and add it to the front then check for string matcing !! i had this idea. Will it make it more complex ?? i know it take two lps function calls and the a matching
Sir I would like to bring to your notice that in the binary search question kth missing positive number you have taken the missing numbers upto that particular element of array. And used the formula to find no missing upto an array element arr[mid]-mid- 1️⃣ but instead of 1️⃣ it should be a[0] as it will not pass test case in terms of say 31,33,34,48,43 And we want to find the first missing number than it will show 1 as output on leetcode or any other platform but it should show 32 . Please sir look in to it i will be highly grateful 🙏
Brute Force for Shorted Palindrome:(1st question): - int minCharsforPalindrome(string s) { // Write your code here. int n = s.length(); int start = 0, end = n-1; int count = 0; while(start
31:00 in java class Solution { public static int minChar(String str) { //Write your code here //String reverse StringBuilder rev = new StringBuilder(str); rev.reverse(); int size = str.length();//old size str+='$';//separator str+=rev.toString();//Reverse //have to find longest prefix int [] lps = new int[str.length()]; int pre=0,suf=1; while(suf
Bhaiya aap reply do pls homework questions solve nhi ho rhe consistent hai day 1 se code ko dry run wagera sab karte hai pr bhi nhi ho rhe hw questions 😢
Easy to read and uderstand solution for find the index of 1st occurrence public int strStr(String text, String pattern){ //here the point is to implemnet string.indexOf() int n = text.length(), m = pattern.length(); int[] prefixFunction = new int[m]; for (int i = 1, k = 0; i < m; ++i) { while (k > 0 && pattern.charAt(k) != pattern.charAt(i)) k = prefixFunction[k - 1]; if (pattern.charAt(k) == pattern.charAt(i)) prefixFunction[i] = ++k; } for (int i = 0, q = 0; i < n; ++i) { while (q > 0 && pattern.charAt(q) != text.charAt(i)) q = prefixFunction[q - 1]; if (pattern.charAt(q) == text.charAt(i) && ++q == m) return i - m + 1; } return -1; }
Solution of all question
This is the solution to all the questions asked in class today.
// * Minimum characters to be added at front to make string palindrome
// ~ Method 1 : Using LPS algorithm
#include
#include
#include
using namespace std;
int main()
{
string s;
cout
thank you bro
60 din hogaye bhaiya pata bhi nhi chala.. ❤
best learning channel for programming.
Bhaiyaa aap Tough bol rahe thai par yeh toh easy hi lag raha hai abhi tak....
Hats of to your explanation..
Ekdam acche se chamak gaya bhaiya.
Your teaching style your dedication is unbeatable. The way you teach, the way you focus even in little thing so we can understand the problem well is on top. I really salute you. Your are a game changer. Really appreciate your hard work.
bhaiya sb kuch chamak gya hai aache se thankyou bhaiya for your hard work for students bhaiya aap sare topic itne easiy way me padhate ho ke pta he nhi chalta ke yeh itne hard topic hai
Chamak gya aapse pahla logic socha toh confidence aa gya
38:30
//circular pattern matching
#include
#include
using namespace std;
void lpsfind(vector&lps,string txt)
{
int prefix=0,suffix=1;
while(suffix
Chamak Gaya bhaiya ❤❤
Bhaiya Chamak gaya sab kuch ❤
bhaiya chamak gaya 😉😉
Chamka bhaiya chamka 👍🏻
bhaiya sab kuchh chamak gaya💯💯
Chamak gaya ❤
bhaiiyaa i had another idea for circula string matching yours is simplified!! but i want to do it like this first i am going to take str1 and reverse and add it the find lps for it then find where the prefix suffix is equal and then take that string and add it to the front then check for string matcing !! i had this idea. Will it make it more complex
?? i know it take two lps function calls and the a matching
chamak gya bhaiya
made strings so easy for me
ab linked list ki bari
Maza ayya sir ji..sab chamak gaya
Solution:circular pattern matching
#include
#include
#include
using namespace std;
void lpsfind(vector&lps,string s) {
int pr = 0;
int sa = 1;
int n= s.size();
while(sahaystack;
string needle;
cin>>needle;
cout
Sir I would like to bring to your notice that in the binary search question kth missing positive number you have taken the missing numbers upto that particular element of array.
And used the formula to find no missing upto an array element arr[mid]-mid- 1️⃣ but instead of 1️⃣ it should be a[0] as it will not pass test case in terms of say 31,33,34,48,43
And we want to find the first missing number than it will show 1 as output on leetcode or any other platform but it should show 32 .
Please sir look in to it i will be highly grateful 🙏
Kmp kahin aur ache se nahi mila. Thanks bro
rohit bhaiya ap god hai bhaiya sahi mein god hi hai aap
chamak gyaa bhaiyaa
sab kuch chamak gya🌟
chamak gaya bhaiyaa
why its showing runtime error???
#include
#include
using namespace std;
void findlps(vector& lps,string patt){
int pre=0 , suff=1;
while(suff
Good morning bhaiya
Maine Aaj hi join Kiya hey app ka channel aur premium bhi,
Aap ka padane ka tarika bahut acha hey,aur mujhe samaj bhi aara ha hey
worthit decision raha to watch this video after trying question for more than hour
pura chamak gaya😇
Amazing Lecture bro...The way you explain is awesome ❤❤❤❤
mazza aaya bhaiye . Thank you so much!
class Solution {
public:
void lps(vector&count,string st)
{
int start=0,end=1;
while(end
chamak gya bhaiya badiya se
❤
Day 60 done and dusted.
completed the whole playlist on 13/05/2024....
Brute Force for Shorted Palindrome:(1st question): -
int minCharsforPalindrome(string s) {
// Write your code here.
int n = s.length();
int start = 0, end = n-1;
int count = 0;
while(start
lps chamak gya badiya se
Enjoyed a lot :)
Amazing COntent mann
31:00 in java
class Solution {
public static int minChar(String str) {
//Write your code here
//String reverse
StringBuilder rev = new StringBuilder(str);
rev.reverse();
int size = str.length();//old size
str+='$';//separator
str+=rev.toString();//Reverse
//have to find longest prefix
int [] lps = new int[str.length()];
int pre=0,suf=1;
while(suf
38:30
// circular pattern matching
#include
#include
using namespace std;
int main()
{
string s1 = "cdeabroab";
string s2 = "abcde";
string s = s1+s1;
vectorsub(s2.size(),0);
int first=0, second=0;
while(second
Bhaiya aap reply do pls homework questions solve nhi ho rhe consistent hai day 1 se code ko dry run wagera sab karte hai pr bhi nhi ho rhe hw questions 😢
bhaiiya i feel bad that i couldnt fid the make a string palindrome . the logic blew my mind>>!!! Wowwwwww
39:40 chamak gaya bhaiya
You're the best!!!
bhaiyya when u teach DSA u make the tough concepts look so easy
Bhaiya u r the best❤
Bhaaiya aapki coding videos prepare karle to bahut hai ya striver ki sde sheet bhi follow karni padegi ?
bhaiya ki sheet follow kr lo more then enough h
@@anshyoutuber1608 kaun si sheet
Chamakk gya bhaiya ❤
Bhaiya ek baar string compression and string to integer ka code bhi lewa dijiye ek lecture leke please🙌🙌🙌🙌
chamak gaya bhaiya
Bhaiya Done question 38:15....
❤🎉
bhaiya mene kmp match ka pehla wala code lagaya bruteforce to unidentified function erroe aa rha h
Easy to read and uderstand solution for find the index of 1st occurrence
public int strStr(String text, String pattern){
//here the point is to implemnet string.indexOf()
int n = text.length(), m = pattern.length();
int[] prefixFunction = new int[m];
for (int i = 1, k = 0; i < m; ++i) {
while (k > 0 && pattern.charAt(k) != pattern.charAt(i))
k = prefixFunction[k - 1];
if (pattern.charAt(k) == pattern.charAt(i)) prefixFunction[i] = ++k;
}
for (int i = 0, q = 0; i < n; ++i) {
while (q > 0 && pattern.charAt(q) != text.charAt(i))
q = prefixFunction[q - 1];
if (pattern.charAt(q) == text.charAt(i) && ++q == m) return i - m + 1;
}
return -1;
}
Sabhi concepts chal rahe bhaiya. 😊
Tq bhaiya😄
Again an amazing lecture...
Chamak gaya bhaiya acche se ❤
chamak gya bhaiya
Done Bhaiya... Day 60/180 ✅
Bhaiya Homework ques solve nhi hore to chod du ?
Thank you for your efforts bhaiyya
circular pattern m s="aa" goal=''a'' ye wala test case run nhi ho rha kya condition lagani padegi lps m
mera bhi nhi ho rha tumhara hua please tell me where is the error
Bhaiya Mtech cse pass karna tough hota h kya iit se ?
Bhaiya koi sheet bhi lagani hai except your coding videos for placement ?
unki ek sheet h main channel pr wo follow kr lo
Bhaiya Mai Java with DSA kar rha hu isiliye mujhe c++ ka idea nhi hai😢 isiliye AAP Java aur c++ dono me code karke samjhaya kariye😢
Day 60 done🔥
Chamak gaya😃
Bhaiya coding sheet kahase milega for paid students 🙏🏻🙏🏻🙏🏻
Good Morning bhaiya ❤❤
Day 60/180 done ✅✅✅✅✅✅✅✅✅
3 din se fassa hua hu iss concept par
Gm bhaiya ❤❤
Thanks Bhaiya...❤🎉
Done
Concept samajne ke baad to hard medium or medium easy lag rahe hai
Bhaiya Radhe Radhe 🙏
40.00 chamak gya bhaiya/sir
Day 60 👍✅ Chamak Gaya
Good Morning Bhaiya
sab kuch chamak gaya bhaiya
day 60 completed
#coderArmy
#180dayschallenge
Chamak gaya bhaya
Chamak gaya bhaiya
Chamak gaya ache se 🫡✅
Good morning bhaiya #day60
Day 60/180 👍👍
Ram Ram Coders 🙏😊❤
CHAMAK GAYA GURU
🎉
chamak gya bhaiyya
Chamak gaya😊😊😊😊😊😊❤❤❤
Bhaiya Din to 60 ho gaye lekin video 49 upload Hua Hai sirf Din Ka challenge hai ki video numbers ka
😶🌫️
Day 60 ✅🔥
Chamka gya bhaiya ✨
chamak gya
Chamak gaya ek hi baar me
chamak gya bhaiya
bhaiya chamka diya
i dare you to find better explanation than this in the whole universe
Day 60/180 #180DaysOfCode