my code does 5/10 .. I have two ideas and both of them do 5/10 ..
well, the first idea is to find a color, which has the largest distance between the index of it' first and last appear, then I continue with that idea finding next number and so on, but in new subsequences ...
The other idea is to count appearence of a color and than I get subsequences between that first color and continue with this idea with those new subsequences ..
If someone has a same idea he/she could look at my code but does anybody has any other ideas?
well, the first idea is to find a color, which has the largest distance between the index of it' first and last appear, then I continue with that idea finding next number and so on, but in new subsequences ...
The other idea is to count appearence of a color and than I get subsequences between that first color and continue with this idea with those new subsequences ..
If someone has a same idea he/she could look at my code but does anybody has any other ideas?