#9. LeetCode | Shuffle String | Java 11 | Easy | #leetcode

preview_player
Показать описание
You are given a string s and an integer array indices of the same length. The string s will be shuffled such that the character at the ith position moves to indices[i] in the shuffled string.

Return the shuffled string.

Input: s = "codeleet", indices = [4,5,6,7,0,2,1,3]
Output: "leetcode"
Explanation: As shown, "codeleet" becomes "leetcode" after shuffling.

Рекомендации по теме
Комментарии
Автор

Hi Amod !! this series is exciting.. waiting for 91 more programs :)

sidheshlotlikar
visit shbcf.ru