String Problems
- Reverse a string.
- Check whether a string is a palindrome.
- Count each character’s frequency.
- Find the first non-repeating character.
- Check whether two strings are anagrams.
- Remove duplicate characters while preserving order.
- Find the longest word in a sentence.
- Compress repeated characters, such as
aaabbtoa3b2. - Check whether a string contains only digits without using
isdigit(). - Find the longest common prefix in a list of words.