This repo consists of common string challenges that may appear during an iOS interview. They're helpful if you're sharpening your Swift skills and fun to do! Last updated - February 8, 2021.
- Swift 5.3
-
Remove a specific character
-
Remove duplicate letters
-
Reverse a given word
-
Rotate string right by n characters
-
Rotate string left by n characters
-
Determine if string is a palindrome
-
Determine if two strings are an anagram
-
Determine if letters in a string are unique
-
Determine if two strings contain the same characters
-
Determine if a string has digits
-
Determine if two strings are identical in length but have no more than three different letters
-
Determine if one string is a rotation of another
-
Determine if a string is a substring of another
-
Return the first non-repeating character
-
Return all unique characters
-
Return duplicate characters
-
Return characters repeated n times
-
Return the sum of a string
-
Return the number of times a specific character appears
-
Return a string with multiple spaces replaced with a single space
-
Return a tuple containing the number of vowels and consonants in a given string
-
Return the most common character
-
Return all permutations of a string
-
Return a single string from an array of names
-
Return the longest prefix
- Download the StringManipulationQuestions playground file to view the questions without the answers.
- Download the StringManipulationAnswers playground to view questions and my answers.