I need to check if it's possible to create 1 specific string from a selection of numbers and letters in another string. Like if I had an "available" string of "AABB12" then would I be able to create string "BA 112". I wouldn't be able to cause there is only one "1".
How do I start solving this problem? What is the logic or point behind this?
You could make a map of available letters in the first string, then when checking the second string count all instances of each letter, and check the map to see if you have that many.