My initial guess, if using C/C++, is to quicksort the characters in the string, then you scan through and look for successive characters that are equal.
@SonuKumar-mt8by10 ай бұрын
Hai bro very nice explanation
@xbzq10 ай бұрын
Yeah an array is a data structure. So that's terrible. You failed the interview. So sad. So bad.
@mariushmedias10 ай бұрын
Sounds to me like one solution would be using two for loops .... for every character, look ahead in second for from the next byte/char to last and see if that character shows up again ... if it does, your string is not unique. Another solution , if you're allowed to modify the original string, is to run a sort on it.. again, if you find two characters that are identical it's a bad string. You'll need a temporary variable to use to swap characters during sort, but that should be allowed, because you'll have temporary variables for the for loops anyway, no way around it.
@rekhakalasare4910 Жыл бұрын
But after concat we are accessing changed value only then the purpose of being immutable not served right? As by any means user is accessing changed value not the old one
@nobojittanti207 Жыл бұрын
Thank you
@abebayehujm Жыл бұрын
Nice
@sona4612 Жыл бұрын
Nice 👍👍
@brunomiguel6603 Жыл бұрын
It's clear , and how about prinitives data type ? Are Java primitives immutable?
@NAGARAJU-fx8cl Жыл бұрын
Good video
@Explorebyrajat0 Жыл бұрын
Done mil gaya
@akhileshsohotoo4428 Жыл бұрын
thanks so much
@itsme-tu4fy Жыл бұрын
thank my bro
@itsme-tu4fy Жыл бұрын
2023 now but i'm watch video
@Soul11396 Жыл бұрын
😍😍😍😍
@loveki5369 Жыл бұрын
Bhai apney concept shi se nhi smjha, ye aesey nhi hoga, apney code voh gayle lokmam mackdowell vali book se same to same teep diya hai
@RizwanKhanSahab2 жыл бұрын
I am getting error it is saying change modifier of "btn00" to final. Can you tell me any suggestions?
@frycstyle39672 жыл бұрын
How You get acces to btn in CheckWinner method? I cant use btn like You
@dipanshubarfa67552 жыл бұрын
Very helpful!
@tanu33312 жыл бұрын
THE BEST EVER !!!!
@ToughNevyHacSoc2 жыл бұрын
Hey bro, Can you please help me create a draw method if nobody wins. like when the whole board is full, I want to say Draw. How can I do it? Pleas help.
@pawansnair9972 жыл бұрын
Just add an extra condition
@shubhamchavan3042 жыл бұрын
confusion hi confusion
@biswajitbiswal72742 жыл бұрын
Its simple and helpful
@priyankdabhi63502 жыл бұрын
buddy can u provide source code
@augustinepatrick10182 жыл бұрын
Very helpful video and explanation! Thank you
@djpsn70942 жыл бұрын
We can do with object as well
@TheKillermob132 жыл бұрын
what part of " Without Using An Additional Data Structure" is not clear ? you used Boolean Array !!
@yogeshjain83332 жыл бұрын
Nice Lecture👍
@bhartikumari44662 жыл бұрын
Best nd easiest way jst like sidhi baat no bkwaas😘
@tma79072 жыл бұрын
Bro u deserve a million subs, Ur explanation is Superbbb
@manojarya76762 жыл бұрын
Confused.
@RaviShankar-vg6ql2 жыл бұрын
What's ur ide
@shreyaskalnad9702 жыл бұрын
i didn’t understand the concept of adding static at 6:28 could you pls explain in what situations we need to add it and what situations we neednt? thanks
@thenaturelove5552 жыл бұрын
Really osm brother
@Karan-yy8ff3 жыл бұрын
Thanks bro🔥🔥🔥 its better than cramming things
@raz4783 жыл бұрын
I think, instead of str[trueLength] = '\0' it should be str[index] = '/0'. NO?
@steved.10912 жыл бұрын
This line is totally unnecessary in Java, seems like he just copy-pasted the solution from the book. And for C/C++ it should be str[index]
@adarshkesarwani20123 жыл бұрын
Bhaiya class 12 isc ka methods chapter kr do pls mere paper hai plzzz..... If u can do plz reply
@adarshkesarwani20123 жыл бұрын
Keep continue... It is too helpful bcoz the way u explain in easy language is effective
@sailakshmi80083 жыл бұрын
👏👏
@madhukarvissapragada89553 жыл бұрын
Instead get the sum of ASCII values of each character in both the strings and check if their sum is equal or not
@pinigantikrishnavamsi77792 жыл бұрын
In this case will it be O(n)?
@uditgupta76272 жыл бұрын
Damn that's osm
@Nitinsingh-uj1gw Жыл бұрын
Wrong. with this logic "bb" will be permutation of "ac"; a = 97 b = 98 c = 99 98+98 = 97+99 b + b = a + c
@Nitinsingh-uj1gw Жыл бұрын
Instead get the total occurance of each charactor in both string seperatley and store it in seperate array and then compare both arrays
@abhiram60873 жыл бұрын
if you don't consider charcheck array as an additional data structure, why don't we go ahead and use HashSet instead. 1--> we traverse through the string and add every Character to the HashSet. 2--> so, HashSet doesn't allow duplictaes. 3--> after traversing we use an if Condition to check the Hash Set Size. 4--> if Hash Set size is equal to the length of the string we return true(which means there is no duplicates), else we return false(duplicates are present). please reply . is my method correct
@rajeshtalreja54013 жыл бұрын
You are using the additional data structure but please go through the problem statement.
@GunaGuna-ot2xd3 жыл бұрын
Bro it's very nice🥳clear understand keep rocking bro