Determine if Two Strings Are Close | Live Coding with Explanation | Leetcode #1657

preview_player
Показать описание
To support us you can donate

Check out our other popular playlists:

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.

#coding #leetcode #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode
Рекомендации по теме
Комментарии
Автор

We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!!

Questions you might like:

Struggling in a question??

Leave in a comment and we will make a video!!!🙂🙂🙂

AlgorithmsMadeEasy
Автор

The reason why I like this channel the most is because of the explanation of the algorithms with some visuals. But nowadays instead of explaining the algorithm, the code is being explained which is not good.

bharathkv
Автор

time complexity with the sorted approach is O(n) if and only if you're using number sort. Not sure about default java sort, but its probably a hybrid with an n log n rutime

abelsimon
Автор

Isn't the time complexity of the final solution O(nlog(n)) since we are sorting the arrays ?
A slight optimization is we can also have this check at beginning
if(word1.length() != word2.length())
return false;
Nice solution and explanation guys

akashselvakumar
Автор

We can use priority queue and map to solve this problem

only_for_funr
Автор

How does comparing the frequencies help? for eg : "cabbba" and "abbccc" are close though the frequencies of individual characters are not same ...

PensivePortraits
Автор

I think Array.sort() function is nlog(n), wdyt?

minarezkalla
Автор

Background music is distracting and annoying.

MrPanthershah
Автор

It's the solution. Where is the explanation?

vipulm