Question: 3. Programming Question Easy #2 Given a string s and a list of integers indices (of the same length as the string s). Print string

 3. Programming Question Easy #2 Given a string s and a

3. Programming Question Easy #2 Given a string s and a list of integers indices (of the same length as the string s). Print string s so that it shuffles each character in s to the ith position represented by indices[i] in the shuffled string. Print the shuffled string. For example: Example 1 : Input: s = "Spelman College", indices=[12,4,0,13,5,10,9,2,7,6,1, 11,3, Output: "el epmoCgnalsle" Example 2: Input: s = "aaiougrt", indices = [4,0,2,6,7,3,1,5] Output: "arigatou

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!