Skip to content

Commit 3002779

Browse files
add problem descriptions
1 parent 143b876 commit 3002779

5 files changed

+7
-13
lines changed

EASY/src/easy/BalancedBinaryTree.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import classes.TreeNode;
44

55
/**
6-
* */
6+
* Given a binary tree, determine if it is height-balanced.
7+
8+
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.*/
79

810
public class BalancedBinaryTree {
911

EASY/src/easy/BestTimeToBuyAndSellStock.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package easy;
22

3-
/**121. Best Time to Buy and Sell Stock QuestionEditorial Solution My Submissions
4-
Total Accepted: 117685
5-
Total Submissions: 318311
6-
Difficulty: Easy
3+
/**121. Best Time to Buy and Sell Stock
4+
*
75
Say you have an array for which the ith element is the price of a given stock on day i.
86
97
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.

EASY/src/easy/BinaryTreeLevelOrderTraversal.java

-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
/**102. Binary Tree Level Order Traversal
1111
12-
Total Accepted: 117221
13-
Total Submissions: 341219
14-
Difficulty: Easy
15-
1612
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
1713
1814
For example:

EASY/src/easy/BinaryTreeLevelOrderTraversalII.java

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
/**107. Binary Tree Level Order Traversal II
1212
13-
Total Accepted: 91577
14-
Total Submissions: 258036
15-
Difficulty: Easy
16-
1713
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
1814
1915
For example:

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110
|112|[Path Sum](https://leetcode.com/problems/path-sum/)|[Solution](../../blob/master/EASY/src/easy/PathSum.java)| O(n)|O(1) | Easy| DFS
111111
|111|[Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/)|[Solution](../../blob/master/EASY/src/easy/MinimumDepthofBinaryTree.java)| O(n)|O(1)~O(h) | Easy| BFS, DFS
112112
|110|[Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/)|[Solution](../../blob/master/EASY/src/easy/BalancedBinaryTree.java)| O(n)|O(1)~O(h) | Easy| DFS
113+
|107|[Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/)|[Solution](../../blob/master/EASY/src/easy/BinaryTreeLevelOrderTraversalII.java)| O(nlogn)|O(h) | Easy| BFS
114+
|102|[Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)|[Solution](../../blob/master/EASY/src/easy/BinaryTreeLevelOrderTraversal.java)| O(n)|O(h) | Easy| BFS
113115
|91|[Decode Ways](https://leetcode.com/problems/decode-ways/)|[Solution](../../blob/master/MEDIUM/src/medium/DecodeWays.java)| O(n)|O(n) | Medium| DP
114116
|98|[Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)|[Solution] | O(n) | O(1) | Medium | DFS/Recursion
115117
|79|[Word Search](https://leetcode.com/problems/word-search/)|[Solution](../../blob/master/MEDIUM/src/medium/WordSearch.java)|O(m*n*l) ? |O(m*n)|Medium|Backtracking/DFS

0 commit comments

Comments
 (0)