Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ Resolving problems of LeetCode in RustLang.

## Solusions

* [7. Reverse Integer](./reverse_integer/README.md)
* [15. 3 Sum](./three_sum/README.md)
* [7. Reverse Integer](./reverse_integer/src/lib.rs)
* [15. 3 Sum](./three_sum/src/lib.rs)
* [215. Kth Largest Element in an Array](./kth_largest/src/lib.rs)

## References

* [LeetcodeTop](https://github.com/afatcoder/LeetcodeTop): Top Hit Leetcode problems in interviews.
3 changes: 0 additions & 3 deletions kth_largest/README.md

This file was deleted.

19 changes: 14 additions & 5 deletions kth_largest/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#![allow(dead_code)]

/*!
* It works but slower than:
* ```rust,ignore
* # 215. Kth Largest Element in an Array
*
* * [Problem link](https://leetcode.com/problems/kth-largest-element-in-an-array/)
*
* ## Other Solutions
*
* The solution works but slower than sort all elements and get by index in Rust like below.
*
* ```rust,no_run
* # struct Solution {}
*
* impl Solution {
* pub fn find_kth_largest(nums: Vec<i32>, k: i32) -> i32 {
* let mut nums = nums;
Expand All @@ -11,7 +18,9 @@
* }
* }
* ```
*/
*/

#![allow(dead_code)]

struct Solution {}

Expand Down
3 changes: 0 additions & 3 deletions reverse_integer/README.md

This file was deleted.

6 changes: 6 additions & 0 deletions reverse_integer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*!
* # 7. Reverse Integer
*
* * [Problem link](https://leetcode.com/problems/reverse-integer/)
*/

#![allow(dead_code)]

struct Solution {}
Expand Down
3 changes: 0 additions & 3 deletions three_sum/README.md

This file was deleted.

6 changes: 6 additions & 0 deletions three_sum/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*!
* # 15. 3 Sum
*
* * [Problem link](https://leetcode.com/problems/3sum/)
*/

#![allow(dead_code)]

struct Solution {}
Expand Down