Skip to content

Commit 29611e3

Browse files
committed
Add YT links to javadoc
1 parent 0f3d0db commit 29611e3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/java/by/andd3dfx/common/TrappingRainWater.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* Input: height = [4,2,0,3,2,5]
2020
* Output: 9
2121
* </pre>
22+
*
23+
* @see <a href="https://youtu.be/zGrmT8V8PVE">Video solution</a>
2224
*/
2325
public class TrappingRainWater {
2426

@@ -32,13 +34,13 @@ public static int trap(int[] height) {
3234
int[] rightMax = new int[n];
3335
int water = 0;
3436

35-
// Calculate left_max
37+
// Calculate leftMax
3638
leftMax[0] = height[0];
3739
for (int i = 1; i < n; i++) {
3840
leftMax[i] = Math.max(height[i], leftMax[i - 1]);
3941
}
4042

41-
// Calculate right_max
43+
// Calculate rightMax
4244
rightMax[n - 1] = height[n - 1];
4345
for (int i = n - 2; i >= 0; i--) {
4446
rightMax[i] = Math.max(height[i], rightMax[i + 1]);

src/main/java/by/andd3dfx/string/JewelsAndStones.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* Input: jewels = "z", stones = "ZZ"
2121
* Output: 0
2222
* </pre>
23+
*
24+
* @see <a href="https://youtu.be/QrJq3q1e0Jw">Video solution</a>
2325
*/
2426
public class JewelsAndStones {
2527

0 commit comments

Comments
 (0)