class Solution: def revmoveDuplicateChars(self,s:list)->None: m = list([0 for i in range(255)]) i=0 while iarray[left-1]: right = i-1 i =i+1 if left==0: return True if right == -1: right = len(array)-1 i=0 insert_pos=0 while i< left: if array[i]>array[right]: insert_pos=i break i=i+1 if i==0 and insert_pos==0: return True if i!=0 and insert_pos==0: return False if insert_pos!=0 and array[insert_pos-1]