File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 385
385
| 1512 | [ Number of Good Pairs] ( https://leetcode.com/problems/number-of-good-pairs ) | [ ![ Java] ( assets/java.png )] ( src/NumberOfGoodPairs.java ) | |
386
386
| 1518 | [ Water Bottles] ( https://leetcode.com/problems/water-bottles ) | [ ![ Java] ( assets/java.png )] ( src/WaterBottles.java ) | |
387
387
| 1523 | [ Count Odd Numbers In Interval Range] ( https://leetcode.com/problems/count-odd-numbers-in-an-interval-range ) | [ ![ Java] ( assets/java.png )] ( src/CountOddNumbersInIntervalRange.java ) | |
388
- | 1528 | [ Shuffle Strings] ( https://leetcode.com/problems/shuffle-string ) | | |
388
+ | 1528 | [ Shuffle Strings] ( https://leetcode.com/problems/shuffle-string ) | [ ![ Java ] ( assets/java.png )] ( src/ShuffleString.java ) | |
389
389
| 1534 | [ Count Good Triplets] ( https://leetcode.com/problems/count-good-triplets ) | | |
390
390
| 1539 | [ Kth Missing Positive Number] ( https://leetcode.com/problems/kth-missing-positive-number ) | | |
391
391
| 1544 | [ Make The String Great] ( https://leetcode.com/problems/make-the-string-great ) | | |
Original file line number Diff line number Diff line change
1
+ public class ShuffleString {
2
+ public String restoreString (String s , int [] indices ) {
3
+ final char [] result = new char [indices .length ];
4
+ for (int i = 0 ; i < s .length () ; i ++) {
5
+ result [indices [i ]] = s .charAt (i );
6
+ }
7
+ return String .valueOf (result );
8
+ }
9
+ }
You can’t perform that action at this time.
0 commit comments