Longest substring without repeating characters | C++ Placement Course | Lecture 26.3

preview_player
Показать описание
Notes of this Lecture:
Рекомендации по теме
Комментарии
Автор

bhaiya kabhi logic ke sath thoda code tho btha diya kro aap ese code krthe hai jese app apni revision kr rahe ho

raturibrothers
Автор

vector<int> dict(256, -1)
means that all the ascii values are initialised by -1
and 256 because that is the limit of ascii values and dict is just a name the way we created a(n) in previous videoes

Mapmaltesh
Автор

Please go through the code deep dive you only focus to complete the video as possible as you can

aliasgarkapadia
Автор

Well this video surely not those who don’t have cs background.effortless video.🙏 it’s feel like formality krrahe ho ye video bna kr 😅😂🥲

upcomingsarcartist
Автор

2 min mai code kar diya..aur kuch bhi samaj nahi aaya

raghavmaheshwari
Автор

Bhaiya please upload notes for all remaining lectures of c++🙏🙏

RahulKumar-xenj
Автор

this types of videos are enough to depress you.

mdhridoymia
Автор

Bhai code likhate time Bata bhi diya karo ki Kyu likha he . 🙄🙄

mrssp-gosc
Автор

please try to explain naive approach also we are not going to byheart this optimal approach and answer interview.

AjayGupta-htxe
Автор

Sir these video lectures are great.
But the moment a question comes in front of me in video, I am not able to formulate logic by my own self.
From starting I have reached till this video, I understood the concept when it was explained nut the implementation of that concept I am not able to do.
Also I keep going on watching videos one after other and code along but it feels like the past content is flushed out of my mind.
I couldn't remember the logic and strategy used.
Please kindly help me regarding the approach with which I should study from this playlist.

shreyakanodia
Автор

but how you got the value of dict[s[i]] where s[i] is a char; and how it is possible to do dict[char value] to get a int value?

charanteja
Автор

for string 'abbedfgi':the answer is 6
but instead it gives 5.

meetbhardiwala
Автор

why your code explanations are'nt beginner friendly?? i guess u are only targeting pros

VikasGupta-ppyt
Автор

s.size() counts the size of the array or string by itterating over it, so in your code you are counting the size of the string in every loop which is not necessary and, so put that in a variable first and then use it in the loop. length is recalculated in every iteration of the loop, the time complexity becomes O(n^2). This is because, in each iteration, the length of the array is recomputed, resulting in a time complexity that grows quadratically with the size of the array. POOR CODE.

rohitkumar-kuki
Автор

📅17 March 2024. I was here
Hope I will complete the playlist soon 😊✌

sachinkashi
Автор

When will you start uploading Java lectures ???

anantyadav
Автор

another logic for longest substring o(n)

#include <iostream>
#include<string>

using namespace std;

string para(string s)
{

int n=s.size();
// cout<<n;
string t;
t+=s[0];
string p="";

//cout<<p;
for(int i=1;i<n;i++)
{
if(s[i]!=s[i-1])
{
p+=s[i-1];
}
else
{
p="";
}
t=max(t, p);
}
cout<<t.size()<<endl;
return t;
}
int main()
{
string s="bbbbabcdaabbbb";
cout<< para(s)<<endl;
}

KaranYadav-pffg
Автор

what is that other parameter in vector<int> dict(256, -1)???

artmixfake
Автор

it will not work for testcase with single character in string:
ex:
input:"a"
expected output:1
current output:0

jbxuksz
Автор

we proud of you sir....thank you for your efforts sir....aman dhattarwal sir and team ...you are the best....

sanyalworld
visit shbcf.ru