Ad
  • Custom User Avatar

    Hey Alfie. Great work!
    I did pretty much the same as you did. I think it's the most straightfoward solution.
    I would just optimise your solution by writting:

    if(str[t] == x){
    total += omit;
    }