Given a string representing a long trail of toys, and an integer K=2, find the maximum number of toys you can pick up, given that you can only pick at most two types of toys.
{
"s": "abaccab"
}4{
"s": "aaaaa"
}5{
"s": "abcde"
}2Sign in to Run Code and Submit