PP2: Week 12: June 7 - 13 Java Threads + Functional Interface
Reverse a substring
In a given string s was chosen a substring of characters from the i-th to the j-th inclusive (characters in the string s are numbered starting from one). Then was swapped the i-th symbol with the j-th, (i + 1)-th with (j - 1)-th and so on (the substring was reversed). Print the string s after all changes are done.
The first line contains the string s that is no longer than 1000 characters, the second line contains the numbers i and j (i ≤ j).
Print the string s after all changes.
zbbg 2 3
gaqipkajibk 5 6