Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def almostIncreasingSequence(sequence):
- copy=sequence[:]
- #print (copy)
- for i in range (0,len(sequence)):
- sequence.remove(sequence[i])
- if(len(sequence)==len(set(sequence)) and sequence==sorted(sequence)):
- return True
- print(sequence)
- sequence=copy[:]
- #print (copy)
- return False
Advertisement
Add Comment
Please, Sign In to add comment