diff --git a/solutions/033.md b/solutions/033.md index 94ef6af..aed493c 100644 --- a/solutions/033.md +++ b/solutions/033.md @@ -68,4 +68,24 @@ class Solution: return "".join([mapping[index] for index in range(len(s))]) ``` +#### PHP +```php +class Solution { + + /** + * @param String $s + * @param Integer[] $indices + * @return String + */ + function restoreString($s, $indices) { + $n = count($indices); + $mapping = $indices; + + for($i = 0; $i < $n; $i++){ + $mapping[$indices[$i]] = $s[$i]; + } + return implode('', $mapping); + } +} +``` ***NB***: If you want to get community points please suggest solutions in other languages as merge requests.