HackerRank Interview Prep Kit - Problem 10: Ransom Note

Publicado em: 30 Outubro 2020
no canal de: Brian Dyck
1,494
28

Hello, my name is Brian Dyck, I am a full-time software engineer and a Computer Science graduate walking through HackerRank problems for new and old programmers alike. My goal is to help programmers build up skills and not just see the solutions to problems, but to learn how to think through the problems. Many new videos to come, so stay tuned!

Problem: Ransom Note
Description:
Harold is a kidnapper who wrote a ransom note, but now he is worried it will be traced back to him through his handwriting. He found a magazine and wants to know if he can cut out whole words from it and use them to create an untraceable replica of his ransom note. The words in his note are case-sensitive and he must use only whole words available in the magazine. He cannot use substrings or concatenation to create the words he needs.

Given the words in the magazine and the words in the ransom note, print Yes if he can replicate his ransom note exactly using whole words from the magazine; otherwise, print No.

For example, the note is "Attack at dawn". The magazine contains only "attack at dawn". The magazine has all the right words, but there's a case mismatch. The answer is "No".


Nesta página do site você pode assistir ao vídeo on-line HackerRank Interview Prep Kit - Problem 10: Ransom Note duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Brian Dyck 30 Outubro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,494 vezes e gostou 28 espectadores. Boa visualização!