Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
ArXiv:
Tags:
competitive-programming
code-generation
specification-generation
proof-generation
verification
rust
License:
Download leetcode/lc1480/code.rs from Gax-c/VeriContest_Lite: direct link, hf CLI and curl.
- Browser
- Download file 289 Bytes
-
https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc1480/code.rs
- Command line
-
hf download hf://datasets/Gax-c/VeriContest_Lite/leetcode/lc1480/code.rs
-
curl -L -o code.rs https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc1480/code.rs
289 Bytes
| impl Solution { | |
| pub fn running_sum(nums: Vec<i32>) -> Vec<i32> { | |
| let mut result = nums; | |
| let n = result.len(); | |
| let mut i: usize = 1; | |
| while i < n { | |
| result[i] = result[i] + result[i - 1]; | |
| i = i + 1; | |
| } | |
| result | |
| } | |
| } | |