- Personal Notes & Code for Book
- CHP1 - Arrays & Strings
- 1.1 - Is Unique
- TASK: Algorithm to determine if string has all unique characters.
- Cannot use additional data structures.
- Good idea to ask if input is ASCII or Unicode.
- Idea 1:
- loop through all the letters checking it against each other
- O(n^2)
- Idea 2:
- sort the string then check for identical neighbors
- 1.1 - Is Unique
- 1.2 - Check Permutation
- TASK: Given 2 strings, check if one is a permutation of the other.