From 43a8ea4e91a0bc958830b5344b182565e0238e2a Mon Sep 17 00:00:00 2001 From: kaushik raj <122168016+shitcodebykaushik@users.noreply.github.com> Date: Sun, 13 Apr 2025 23:09:16 +0530 Subject: [PATCH 1/2] Update README_EN.md Just added the rust implementation of this problem . It is tested on the leetcode and it successfully passed all test . --- .../1929.Concatenation of Array/README_EN.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/solution/1900-1999/1929.Concatenation of Array/README_EN.md b/solution/1900-1999/1929.Concatenation of Array/README_EN.md index 26c0427d37fca..ba9c41901b7f9 100644 --- a/solution/1900-1999/1929.Concatenation of Array/README_EN.md +++ b/solution/1900-1999/1929.Concatenation of Array/README_EN.md @@ -158,7 +158,18 @@ int* getConcatenation(int* nums, int numsSize, int* returnSize) { return ans; } ``` - +### Rust +```Rust +impl Solution { + pub fn get_concatenation(mut nums: Vec) -> Vec { + let original_len = nums.len(); + for i in 0..original_len { + nums.push(nums[i]); + } + nums + } +} +``` From 810e48dc4478143fa1822d1cb0f63d4665b752a3 Mon Sep 17 00:00:00 2001 From: shitcodebykaushik <122168016+shitcodebykaushik@users.noreply.github.com> Date: Sun, 13 Apr 2025 18:35:07 +0000 Subject: [PATCH 2/2] style: format code and docs with prettier --- solution/1900-1999/1929.Concatenation of Array/README_EN.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/solution/1900-1999/1929.Concatenation of Array/README_EN.md b/solution/1900-1999/1929.Concatenation of Array/README_EN.md index ba9c41901b7f9..3ab5add672c64 100644 --- a/solution/1900-1999/1929.Concatenation of Array/README_EN.md +++ b/solution/1900-1999/1929.Concatenation of Array/README_EN.md @@ -158,7 +158,9 @@ int* getConcatenation(int* nums, int numsSize, int* returnSize) { return ans; } ``` -### Rust + +### Rust + ```Rust impl Solution { pub fn get_concatenation(mut nums: Vec) -> Vec { @@ -170,6 +172,7 @@ impl Solution { } } ``` +