Sherlock and the Valid String Java Coding Challenge | HackerRank | Edabit | How'd You Code That?

Опубликовано: 14 Июнь 2020
на канале: Ed Clark
3,130
211

Sherlock and the Valid String on HackerRank: https://www.hackerrank.com/challenges...

Sherlock and the Valid String on Edabit: https://edabit.com/challenge/Mgrj26S3...

Sherlock considers a string to be valid if all characters of the string appear the same number of times. It is also valid if he can remove just 1 character at 1 index in the string, and the remaining characters will occur the same number of times. Given a string s, determine if it is valid.
If so, return YES, otherwise return NO.

For example, If s is equal to “abc”, the string is valid because the frequencies of characters are all the same. If s is equal to “abcc”, the string is also valid, because we can remove 1 “c” and have one of each character remaining in the string. However, if s is equal to “abccc”, the string is not valid, because removing one character does not result in the same frequency of characters.

Closed Captions/Subtitles - [email protected]

Video Editing - [email protected]

Song: To You - Ikson (Vlog No Copyright Music)
Music promoted by Vlog No Copyright Music.
  / ikson  


Смотрите видео Sherlock and the Valid String Java Coding Challenge | HackerRank | Edabit | How'd You Code That? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Ed Clark 14 Июнь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,130 раз и оно понравилось 211 людям.