What does “spl” mean? Please read
this.
You can put the symbols and their ASCII translations in a Map (as “V” and “K” respectively), yes. You might find you have to traverse the String and seek whether the String begins with all the “K”s at each character. Then you can append the character to a StringBuilder. Yes, it would work, but you are going to find that runs in O(
m ×
n) complexity, which is rather like quadratic complexity.
You might not find a solution which has a lower complexity.