Showing posts with label String Manipulation. Show all posts
Showing posts with label String Manipulation. Show all posts

Sunday, February 10, 2019

Strings: Making Anagrams - Hacker Rank Solution

Check out the resources on the page's right side to learn more about strings. The video tutorial is by Gayle Laakmann McDowell, author of the best-selling interview book Cracking the Coding Interview.

Common Child - Hacker Rank Solution

A string is said to be a child of a another string if it can be formed by deleting 0 or more characters from the other string. Given two strings of equal length, what's the longest string that can be constructed such that it is a child of both?

Special Palindrome Again - Hacker Rank Solution

A string is said to be a special palindromic string if either of two conditions is met:
  • All of the characters are the same, e.g. aaa.
  • All characters except the middle one are the same, e.g. aadaa.

Sherlock and the Valid String - Hacker Rank Solution

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  character at  index in the string, and the remaining characters will occur the same number of times.

Alternating Characters - Hacker Rank Solution

You are given a string containing characters  and  only. Your task is to change it into a string such that there are no matching adjacent characters. To do this, you are allowed to delete zero or more characters in the string.
Powered by Blogger.