Strings Flashcards
1
Q
Count if Characters have repeated in o(n) time and o(1) space
A
Use integer and use bit operations to set the bit as only 26 characters are available
2
Q
Avoid using substring if possible
A
Whenever you use substring, it might be counted as o(n^2) solution.