1 Star 1 Fork 0

vague/leetcode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

leetcode

介绍

使用 Rust 来刷 leetcode。

benchmark

同一问题的测试用例均相同。

题目类别::_编号_问题名称::tests::解答

本仓库解答的函数名目前随机取的,与 leetcode 同名的函数名不一定最优解。

running 22 tests

test array::_0001_two_sum::tests::hashmap ... bench: 935 ns/iter (+/- 64)

test array::_0001_two_sum::tests::iterator ... bench: 244 ns/iter (+/- 23)

test array::_0001_two_sum::tests::iterator_match_pattern ... bench: 256 ns/iter (+/- 8)

test array::_0001_two_sum::tests::simple_for ... bench: 247 ns/iter (+/- 72)

test array::_0004_median_of_two_sorted_arrays::tests::dichotomy ... bench: 204 ns/iter (+/- 44)

test array::_0004_median_of_two_sorted_arrays::tests::dichotomy_faster ... bench: 194 ns/iter (+/- 39)

test array::_0004_median_of_two_sorted_arrays::tests::simple_sort ... bench: 307 ns/iter (+/- 61)

test array::_0011_container_with_most_water::tests::double_pointer ... bench: 136 ns/iter (+/- 24)

test array::_0011_container_with_most_water::tests::double_pointer_vec ... bench: 422 ns/iter (+/- 48)

test array::_0011_container_with_most_water::tests::simple_for ... bench: 404 ns/iter (+/- 12)

test array::_0011_container_with_most_water::tests::width_shrink ... bench: 725 ns/iter (+/- 85)

test array::_0015_three_sum::tests::three_sum ... bench: 577 ns/iter (+/- 39)

test array::_0015_three_sum::tests::use_hashmap ... bench: 1,833 ns/iter (+/- 41)

test array::_0016_three_sum_closest::tests::leetcode_memory_minimun ... bench: 641 ns/iter (+/- 45)

test array::_0016_three_sum_closest::tests::three_sum_closest ... bench: 688 ns/iter (+/- 26)

test array::_0016_three_sum_closest::tests::three_sum_closest_skip ... bench: 674 ns/iter (+/- 10)

test array::_0018_four_sum::tests::four_sum ... bench: 707 ns/iter (+/- 13)

test array::_0026_remove_duplicates_from_sorted_array::tests::dedup ... bench: 24 ns/iter (+/- 1)

test array::_0026_remove_duplicates_from_sorted_array::tests::remove_duplicates ... bench: 24 ns/iter (+/- 0)

test array::_0027_remove_element::tests::left_right ... bench: 46 ns/iter (+/- 2)

test array::_0027_remove_element::tests::left_right_complex ... bench: 60 ns/iter (+/- 1)

test array::_0027_remove_element::tests::remove_element ... bench: 31 ns/iter (+/- 1)

test result: ok. 0 passed; 0 failed; 0 ignored; 22 measured; 0 filtered out; finished in 66.93s

MIT License Copyright (c) 2021 vague Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

leetcode solved with Rust 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/ZIP97/leetcode.git
git@gitee.com:ZIP97/leetcode.git
ZIP97
leetcode
leetcode
master

搜索帮助