Traverse the string s Update arrays arr [ ] and brr [ ]
for i in range ( n ) : NEW_LINE INDENT arr [ ord ( s [ i ] ) - ord ( ' a ' ) ] = s [ i ] NEW_LINE brr [ ord ( s [ i ] ) - ord ( ' a ' ) ] = s [ i ] NEW_LINE DEDENT