Determine if a string has all unique characters [Cracking the Coding Interview] | Part - 2

preview_player
Показать описание
Does the String has all Unique Characters is the first question in "Cracking the Coding Interview" by Gayle Laakmann Mcdowell.

Check out our other popular playlists:

Cracking the Coding Interview has become the defacto Bible for preparing for your coding interviews. I think this is for good reason; it's an awesome book with a ton of good practice coding interview problems.

If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful.

To support us you can donate
Рекомендации по теме
Комментарии
Автор

How is this better than the part 1 solution using sets.
That also requires a max of 26 sized set and we would be looping at the most till 26 characters

vinaykenguva
Автор

shouldn't the TC be O(n) as we are traversing the whole string?

Prashantkumar-pnqq
Автор

@Algorithms Made Easy  but in valid anagram question 242
U did the same approach but u mentioned tc is as 0(n) in that questions but here you said 0(1) how??

funtrap
Автор

How can the time complexity be constant when you are looping on every character of string? The time complexity analysis is wrong.

harshsavasil
Автор

Hey, your way of explaining is awesome. Can i get that source code in JS ?

shashib