Тёмный
No video :(

HackerRank - Making Anagrams | Full Solution with Simplified Examples and Visuals | Study Algorithms 

Nikhil Lohia
Подписаться 45 тыс.
Просмотров 11 тыс.
50% 1

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@alexoballs
@alexoballs 3 года назад
New subscriber here man! Thank you for the thorough explanation of the algorithm and the approach you did! Youre my YT mentor from now on
@nikoo28
@nikoo28 3 года назад
Thanks for your support. :)
@063harshsahu2
@063harshsahu2 9 месяцев назад
You make it Simple, In this World their are very few people who make things easy You are one of them,
@nikoo28
@nikoo28 9 месяцев назад
thank you so much
@Ahmed_Salah00
@Ahmed_Salah00 10 месяцев назад
bro I'm speechless! perfect!!
@nikoo28
@nikoo28 10 месяцев назад
Thank you so much 😀
@maheshguttedar3620
@maheshguttedar3620 2 года назад
Very detailed explanation.
@manishkawale4037
@manishkawale4037 Год назад
Great Explanation.
@deepika8401
@deepika8401 2 года назад
I am able to solve problems because of you
@vikrantkambli9265
@vikrantkambli9265 Год назад
your explanation is crystal clear..thank you so much bro..
@nikoo28
@nikoo28 Год назад
So nice of you
@Philthyyy
@Philthyyy 3 года назад
Very detailed explanation. Thank you for your time and insight.
@amanbindal4512
@amanbindal4512 Год назад
Concept is clear with the video, please explain the program itself as well, why you are taking int c array or like thi
@nikoo28
@nikoo28 Год назад
the solution explains why we need the array. :) do you have a specific doubt? i can help
@rmukeshverma8724
@rmukeshverma8724 Год назад
int n1{s1.size()}; int n2{s2.size()}; int result{}; vector sr1(26); vector sr2(26); for(int i=0; i < n1; ++i) { sr1[abs('a'-s1[i])] +=1; } for(int i=0; i < n2; ++i) { sr2[abs('a'-s2[i])] +=1; } for(int i = 0; i < 26; ++i) { result += abs(sr2[i]-sr1[i]); } return result; why it's incorrect?
@rajakabdul6407
@rajakabdul6407 2 месяца назад
Hae bro Can u explain What is Math.abs(i)
@nikoo28
@nikoo28 2 месяца назад
it gets the absolute value. Example: Math.abs(-1) = 1 Math.abs(1) = 1
@davidlazaro3143
@davidlazaro3143 2 года назад
What an amazing video 🥰
@stonedcodingtom9097
@stonedcodingtom9097 2 года назад
Great video
@92akky
@92akky Год назад
Nice explanation
@nikoo28
@nikoo28 Год назад
Thanks and welcome
@vandanabanny7550
@vandanabanny7550 2 года назад
excellent thank you :)
@tamao1473
@tamao1473 2 года назад
Thanks
@taherkp7321
@taherkp7321 3 года назад
Hi. Just a question here, why are doing (s1.char(i) - 'a' ) here? what is the significance of 'a'. Thanks
@nikoo28
@nikoo28 3 года назад
We want to index each character in alphabet. So ‘a’ = 0, ‘b’ = 1, ‘c’ = 2, ‘d’ = 3…and so on. With this statement we calculate this index. If charAt(i) is ‘a’ then we will get ‘a’ - ‘a’ = 0. This position is now used in array. If charAt(i) = ‘k’. Then ‘k’ - ‘a’ = 10 We get position 10 of array. Does this clear your doubt?
@taherkp7321
@taherkp7321 3 года назад
@@nikoo28 Yes.. Thanks
@Grammar-EN
@Grammar-EN Год назад
bro in which language u explained
@nikoo28
@nikoo28 Год назад
this is in JAVA
@pratyakshamaheshwari8269
@pratyakshamaheshwari8269 2 года назад
int makeAnagram(string a, string b) { int *c = new int(26); for(int i=0;i
@kirannaik4417
@kirannaik4417 11 месяцев назад
total = total + abs(c[i]) ; I think you had found the mistake..
@VishalEdu03
@VishalEdu03 5 месяцев назад
.c[s1.charAt(i) - 'a '] ++ ..anyone can explain using for loop ...
Далее
He Didn’t Know My Mom is a Chess Grandmaster…
5:55
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36