The original question is along the lines of:
Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures?
Focus on the second sentence, It says we cannot use additional data structures, i.e you need to consider the space complexity of your solution. Your solution uses an array and therefore is not meeting the questions criteria.