2516. Take K of Each Character From Left and Right - Explanation

Problem Link