In all problems time complexity String.charAt(i) is considered as 1. I understand it is true for array. But for string also O(1)?