Saturday Questions
Questions on Strings
- Check if 2 words are anagrams or not?
Eg worth and throw are anagrams. - Validate a given IP address. Eg 123.221.107.99 is a valid IP address
- Reverse words in a sentence.
Eg this is a train becomes train a is this - Find palindromes in a sentence.
Eg Madam is a Malayalam speaker.
Madam, a, and Malayalam - Check for a Panagram. A panagram is a sentence that contains every letter in the alphabet.
Eg A quick brown fox jumps over the lazy dog. - Implement ATOI, a program that converts an array of characters into an integer.
Eg [1,2,3]=123. - Find longest prefix.
Eg And, Andaman, Andorra. Longest prefix is and. - Convert to proper case. Eg mAhenDer SIngH Dhoni becomes
Mahender Singh Dhoni - Convert a name to initials.
Mahender Singh Dhoni=MS Dhoni. Mahender Dhoni = M Dhoni. - Find longest suffix.
Eg best, nicest, surest = est
Post your answers in the discussion boxes below.
Eg worth and throw are anagrams.
Eg this is a train becomes train a is this
Eg Madam is a Malayalam speaker.
Madam, a, and Malayalam
Eg A quick brown fox jumps over the lazy dog.
Eg [1,2,3]=123.
Eg And, Andaman, Andorra. Longest prefix is and.
Mahender Singh Dhoni
Mahender Singh Dhoni=MS Dhoni. Mahender Dhoni = M Dhoni.
Eg best, nicest, surest = est
0 Comments