BOP 2.17: Shift the char string by k
Knapsack Problem