wupangyen / LeetCode

LeetCode
1 stars 0 forks source link

Shifting Letters #35

Open wupangyen opened 3 years ago

wupangyen commented 3 years ago

Summary:

Start from the back.

for example if the given s is abc and the shifts are [3,6,9]

if we start from the last char of s which is c

it need to be shifted by 9 letters away , so on next char b will be shifted 9 + 6 letters away

and lastly char a will be shifted 9 + 6 + 3 letters away

wupangyen commented 3 years ago
Screen Shot 2021-09-08 at 4 38 20 PM