Skip to content

Commit 85ec018

Browse files
committed
feat: mark done two pointers section
1 parent 1245116 commit 85ec018

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/hard/trapping_rain_water.rs

+6
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ mod tests {
4949
let height = vec![0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1];
5050
assert_eq!(trap(height), 6);
5151
}
52+
53+
#[test]
54+
fn test_trap_2() {
55+
let height = vec![4, 2, 0, 3, 2, 5];
56+
assert_eq!(trap(height), 9);
57+
}
5258
}

src/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@
5353
- [x] [853. Car fleet](../src/medium/car_fleet.rs)
5454
- [Hard](../src/hard)
5555
- [x] [84. Largest rectangle in histogram](../src/hard/largest_rectangle_in_histogram.rs)
56-
= [ ] [42. Trapping rain water](../src/hard/trapping_rain_water.rs)
56+
- [x] [42. Trapping rain water](../src/hard/trapping_rain_water.rs)

theory/categories/2.two_pointers/readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
- [x] [Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/) | Easy | [Solution](../../../src/easy/two_sum_ii_input_array_is_sorted.rs)
2929
- [x] [3Sum](https://leetcode.com/problems/3sum/) | Medium | [Solution](../../../src/medium/three_sum.rs)
3030
- [x] [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | Medium | [Solution](../../../src/medium/container_with_most_water.rs)
31-
- [ ] [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) | Hard | [Solution](../../../src/hard/trapping_rain_water.rs)
31+
- [x] [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) | Hard | [Solution](../../../src/hard/trapping_rain_water.rs)
3232

3333
Category: `Two Pointers`
3434
Created on: 2023-06-22 19:10:00
35-
Last modified on: 2023-07-26 12:12:000
35+
Last modified on: 2023-07-27 03:24:000
3636
Status: In Progress
3737
Author: [David Bujosa](https://github.com/bujosa)

0 commit comments

Comments
 (0)