You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 0199 |[Binary Tree Right Side View](src/main/kotlin/g0101_0200/s0199_binary_tree_right_side_view/Solution.kt)| Medium | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 194 | 92.89
| 0199 |[Binary Tree Right Side View](src/main/kotlin/g0101_0200/s0199_binary_tree_right_side_view/Solution.kt)| Medium | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 194 | 92.89
1372
+
| 0113 |[Path Sum II](src/main/kotlin/g0101_0200/s0113_path_sum_ii/Solution.kt)| Medium | Depth_First_Search, Tree, Binary_Tree, Backtracking | 364 | 78.67
Given the `root` of a binary tree and an integer `targetSum`, return `true` if the tree has a **root-to-leaf** path such that adding up all the values along the path equals `targetSum`.
Given the `root` of a binary tree and an integer `targetSum`, return _all **root-to-leaf** paths where the sum of the node values in the path equals_`targetSum`_. Each path should be returned as a list of the node **values**, not node references_.
6
+
7
+
A **root-to-leaf** path is a path starting from the root and ending at any leaf node. A **leaf** is a node with no children.
Given two strings `s` and `t`, return _the number of distinct subsequences of `s` which equals `t`_.
6
+
7
+
A string's **subsequence** is a new string formed from the original string by deleting some (can be none) of the characters without disturbing the remaining characters' relative positions. (i.e., `"ACE"` is a subsequence of `"ABCDE"` while `"AEC"` is not).
8
+
9
+
The test cases are generated so that the answer fits on a 32-bit signed integer.
10
+
11
+
**Example 1:**
12
+
13
+
**Input:** s = "rabbbit", t = "rabbit"
14
+
15
+
**Output:** 3
16
+
17
+
**Explanation:** As shown below, there are 3 ways you can generate "rabbit" from s. <code>**<ins>rabb</ins>**b**<ins>it</ins>**</code> <code>**<ins>ra</ins>**b**<ins>bbit</ins>**</code> <code>**<ins>rab</ins>**b**<ins>bit</ins>**</code>
18
+
19
+
**Example 2:**
20
+
21
+
**Input:** s = "babgbag", t = "bag"
22
+
23
+
**Output:** 5
24
+
25
+
**Explanation:** As shown below, there are 5 ways you can generate "bag" from s. <code>**<ins>ba</ins>**b<ins>**g**</ins>bag</code> <code>**<ins>ba</ins>**bgba**<ins>g</ins>**</code> <code><ins>**b**</ins>abgb**<ins>ag</ins>**</code> <code>ba<ins>**b**</ins>gb<ins>**ag**</ins></code> <code>babg**<ins>bag</ins>**</code>
0 commit comments