Filling str1array , convChar and hashmap convertMap .
for i in range ( N ) : NEW_LINE INDENT str1array [ ord ( str1 [ i ] ) - ord ( ' a ' ) ] . append ( i ) NEW_LINE DEDENT for i in range ( N ) : NEW_LINE