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/lc153/code.rs from Gax-c/VeriContest_Lite: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc153/code.rs
- Command line
-
hf download hf://datasets/Gax-c/VeriContest_Lite/leetcode/lc153/code.rs
-
curl -L -o code.rs https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc153/code.rs
393 Bytes
| impl Solution { | |
| pub fn find_min(nums: Vec<i32>) -> i32 { | |
| let mut left: usize = 0; | |
| let mut right: usize = nums.len() - 1; | |
| while left < right { | |
| let mid = left + (right - left) / 2; | |
| if nums[mid] > nums[right] { | |
| left = mid + 1; | |
| } else { | |
| right = mid; | |
| } | |
| } | |
| nums[left] | |
| } | |
| } | |