Тёмный

LeetCode 383 | Ransom Note | String, Counting | Java 

Sleepy Cracker
Подписаться 621
Просмотров 523
50% 1

Questions in English: docs.google.co...
Questions in Mandarin: docs.google.co...

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

 

6 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2   
@sheriffcrandy
@sheriffcrandy 2 года назад
Hey man can you explaing what this means: if (arr[index] == 0) { return false } Why are we returning false if arr[index] == 0? What does arr[index] == 0 mean?
@sleepycracker4732
@sleepycracker4732 2 года назад
Hi, So let's traverse the String magazine first, keep counting the character for the string and store the frequency into the new array(counting array). Once we have all frequency for each character, we can traverse the String ransomNote. when there is an index in array is equal to 0, which means it did not occur in String magazine, we need to return false right away. This meant you can't construct the ransomNote by magazine.
Далее
Ransom note | Leetcode #383
8:21
Просмотров 23 тыс.
How to get Spongebob El Primo FOR FREE!
01:36
Просмотров 16 млн
Bike Challenge
00:20
Просмотров 14 млн
Ransom Note
6:50
Просмотров 20 тыс.
LeetCode Most Common Word Solution Explained - Java
8:21
Leetcode 383 Ransom Note (Java)
3:45
Просмотров 230
LeetCode 290. Word Pattern Solution Explained - Java
8:58
Two Pointer | Is Subsequence | LeetCode 392.
5:34
Просмотров 20 тыс.
383. Ransom Note || Java || Leetcode || Hindi
7:28
Просмотров 2,9 тыс.
How to get Spongebob El Primo FOR FREE!
01:36
Просмотров 16 млн