Skip to content

Commit 43a8ea4

Browse files
Update README_EN.md
Just added the rust implementation of this problem . It is tested on the leetcode and it successfully passed all test .
1 parent 035a59c commit 43a8ea4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

solution/1900-1999/1929.Concatenation of Array/README_EN.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,18 @@ int* getConcatenation(int* nums, int numsSize, int* returnSize) {
158158
return ans;
159159
}
160160
```
161-
161+
### Rust
162+
```Rust
163+
impl Solution {
164+
pub fn get_concatenation(mut nums: Vec<i32>) -> Vec<i32> {
165+
let original_len = nums.len();
166+
for i in 0..original_len {
167+
nums.push(nums[i]);
168+
}
169+
nums
170+
}
171+
}
172+
```
162173
<!-- tabs:end -->
163174

164175
<!-- solution:end -->

0 commit comments

Comments
 (0)