diff --git a/src/main/java/g0001_0100/s0002_add_two_numbers/addtwonumber1.jpg b/src/main/java/g0001_0100/s0002_add_two_numbers/addtwonumber1.jpg new file mode 100644 index 000000000..88a3f3b1b Binary files /dev/null and b/src/main/java/g0001_0100/s0002_add_two_numbers/addtwonumber1.jpg differ diff --git a/src/main/java/g0001_0100/s0002_add_two_numbers/readme.md b/src/main/java/g0001_0100/s0002_add_two_numbers/readme.md index 77abd6701..8cc9e7da0 100644 --- a/src/main/java/g0001_0100/s0002_add_two_numbers/readme.md +++ b/src/main/java/g0001_0100/s0002_add_two_numbers/readme.md @@ -8,7 +8,7 @@ You may assume the two numbers do not contain any leading zero, except the numbe **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/02/addtwonumber1.jpg) +![](addtwonumber1.jpg) **Input:** l1 = [2,4,3], l2 = [5,6,4] diff --git a/src/main/java/g0001_0100/s0011_container_with_most_water/question_11.jpg b/src/main/java/g0001_0100/s0011_container_with_most_water/question_11.jpg new file mode 100644 index 000000000..7661efe42 Binary files /dev/null and b/src/main/java/g0001_0100/s0011_container_with_most_water/question_11.jpg differ diff --git a/src/main/java/g0001_0100/s0011_container_with_most_water/readme.md b/src/main/java/g0001_0100/s0011_container_with_most_water/readme.md index 3f5f57efe..e5a919359 100644 --- a/src/main/java/g0001_0100/s0011_container_with_most_water/readme.md +++ b/src/main/java/g0001_0100/s0011_container_with_most_water/readme.md @@ -8,7 +8,7 @@ Given `n` non-negative integers a1, a2, ..., an **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg) +![](question_11.jpg) **Input:** height = [1,8,6,2,5,4,8,3,7] diff --git a/src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number/200px-telephone-keypad2.svg.png b/src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number/200px-telephone-keypad2.svg.png new file mode 100644 index 000000000..55c153100 Binary files /dev/null and b/src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number/200px-telephone-keypad2.svg.png differ diff --git a/src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number/readme.md b/src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number/readme.md index ef64b4eaf..59dd7ba5a 100644 --- a/src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number/readme.md +++ b/src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number/readme.md @@ -6,7 +6,7 @@ Given a string containing digits from `2-9` inclusive, return all possible lette A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. -![](https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Telephone-keypad2.svg/200px-Telephone-keypad2.svg.png) +![](200px-telephone-keypad2.svg.png) **Example 1:** diff --git a/src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list/readme.md b/src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list/readme.md index 0c5ecdd10..b052f0ac3 100644 --- a/src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list/readme.md +++ b/src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list/readme.md @@ -6,7 +6,7 @@ Given the `head` of a linked list, remove the `nth` node from the end of the lis **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/03/remove_ex1.jpg) +![](remove_ex1.jpg) **Input:** head = [1,2,3,4,5], n = 2 diff --git a/src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list/remove_ex1.jpg b/src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list/remove_ex1.jpg new file mode 100644 index 000000000..1e76e1d85 Binary files /dev/null and b/src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list/remove_ex1.jpg differ diff --git a/src/main/java/g0001_0100/s0021_merge_two_sorted_lists/merge_ex1.jpg b/src/main/java/g0001_0100/s0021_merge_two_sorted_lists/merge_ex1.jpg new file mode 100644 index 000000000..a926641f8 Binary files /dev/null and b/src/main/java/g0001_0100/s0021_merge_two_sorted_lists/merge_ex1.jpg differ diff --git a/src/main/java/g0001_0100/s0021_merge_two_sorted_lists/readme.md b/src/main/java/g0001_0100/s0021_merge_two_sorted_lists/readme.md index 591a61c30..17394e0da 100644 --- a/src/main/java/g0001_0100/s0021_merge_two_sorted_lists/readme.md +++ b/src/main/java/g0001_0100/s0021_merge_two_sorted_lists/readme.md @@ -6,7 +6,7 @@ Merge two sorted linked lists and return it as a **sorted** list. The list shoul **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/03/merge_ex1.jpg) +![](merge_ex1.jpg) **Input:** l1 = [1,2,4], l2 = [1,3,4] diff --git a/src/main/java/g0001_0100/s0024_swap_nodes_in_pairs/readme.md b/src/main/java/g0001_0100/s0024_swap_nodes_in_pairs/readme.md index 3b760b9f3..d8d825d72 100644 --- a/src/main/java/g0001_0100/s0024_swap_nodes_in_pairs/readme.md +++ b/src/main/java/g0001_0100/s0024_swap_nodes_in_pairs/readme.md @@ -6,7 +6,7 @@ Given a linked list, swap every two adjacent nodes and return its head. You must **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/03/swap_ex1.jpg) +![](swap_ex1.jpg) **Input:** head = [1,2,3,4] diff --git a/src/main/java/g0001_0100/s0024_swap_nodes_in_pairs/swap_ex1.jpg b/src/main/java/g0001_0100/s0024_swap_nodes_in_pairs/swap_ex1.jpg new file mode 100644 index 000000000..34d20ce91 Binary files /dev/null and b/src/main/java/g0001_0100/s0024_swap_nodes_in_pairs/swap_ex1.jpg differ diff --git a/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/readme.md b/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/readme.md index d20719d93..17fb527f4 100644 --- a/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/readme.md +++ b/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/readme.md @@ -10,7 +10,7 @@ You may not alter the values in the list's nodes, only nodes themselves may be c **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/03/reverse_ex1.jpg) +![](reverse_ex1.jpg) **Input:** head = [1,2,3,4,5], k = 2 @@ -18,7 +18,7 @@ You may not alter the values in the list's nodes, only nodes themselves may be c **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/03/reverse_ex2.jpg) +![](reverse_ex2.jpg) **Input:** head = [1,2,3,4,5], k = 3 diff --git a/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/reverse_ex1.jpg b/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/reverse_ex1.jpg new file mode 100644 index 000000000..be8d42adc Binary files /dev/null and b/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/reverse_ex1.jpg differ diff --git a/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/reverse_ex2.jpg b/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/reverse_ex2.jpg new file mode 100644 index 000000000..257a5fe50 Binary files /dev/null and b/src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group/reverse_ex2.jpg differ diff --git a/src/main/java/g0001_0100/s0036_valid_sudoku/250px-sudoku-by-l2g-20050714.svg.png b/src/main/java/g0001_0100/s0036_valid_sudoku/250px-sudoku-by-l2g-20050714.svg.png new file mode 100644 index 000000000..e690f26a5 Binary files /dev/null and b/src/main/java/g0001_0100/s0036_valid_sudoku/250px-sudoku-by-l2g-20050714.svg.png differ diff --git a/src/main/java/g0001_0100/s0036_valid_sudoku/readme.md b/src/main/java/g0001_0100/s0036_valid_sudoku/readme.md index db58bb7fb..7595549ff 100644 --- a/src/main/java/g0001_0100/s0036_valid_sudoku/readme.md +++ b/src/main/java/g0001_0100/s0036_valid_sudoku/readme.md @@ -15,7 +15,7 @@ Determine if a `9 x 9` Sudoku board is valid. Only the filled cells need to be v **Example 1:** -![](https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png) +![](250px-sudoku-by-l2g-20050714.svg.png) **Input:** diff --git a/src/main/java/g0001_0100/s0037_sudoku_solver/250px-sudoku-by-l2g-20050714.svg.png b/src/main/java/g0001_0100/s0037_sudoku_solver/250px-sudoku-by-l2g-20050714.svg.png new file mode 100644 index 000000000..e690f26a5 Binary files /dev/null and b/src/main/java/g0001_0100/s0037_sudoku_solver/250px-sudoku-by-l2g-20050714.svg.png differ diff --git a/src/main/java/g0001_0100/s0037_sudoku_solver/250px-sudoku-by-l2g-20050714_solution.svg.png b/src/main/java/g0001_0100/s0037_sudoku_solver/250px-sudoku-by-l2g-20050714_solution.svg.png new file mode 100644 index 000000000..813c726c6 Binary files /dev/null and b/src/main/java/g0001_0100/s0037_sudoku_solver/250px-sudoku-by-l2g-20050714_solution.svg.png differ diff --git a/src/main/java/g0001_0100/s0037_sudoku_solver/readme.md b/src/main/java/g0001_0100/s0037_sudoku_solver/readme.md index 6640d2f0c..0823a3679 100644 --- a/src/main/java/g0001_0100/s0037_sudoku_solver/readme.md +++ b/src/main/java/g0001_0100/s0037_sudoku_solver/readme.md @@ -14,7 +14,7 @@ The `'.'` character indicates empty cells. **Example 1:** -![](https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png) +![](250px-sudoku-by-l2g-20050714.svg.png) **Input:** @@ -42,7 +42,7 @@ The `'.'` character indicates empty cells. **Explanation:** The input board is shown above and the only valid solution is shown below: -![](https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png) +![](250px-sudoku-by-l2g-20050714_solution.svg.png) **Constraints:** diff --git a/src/main/java/g0001_0100/s0038_count_and_say/countandsay.jpg b/src/main/java/g0001_0100/s0038_count_and_say/countandsay.jpg new file mode 100644 index 000000000..0453590e2 Binary files /dev/null and b/src/main/java/g0001_0100/s0038_count_and_say/countandsay.jpg differ diff --git a/src/main/java/g0001_0100/s0038_count_and_say/readme.md b/src/main/java/g0001_0100/s0038_count_and_say/readme.md index a65458a7a..e1a7f2097 100644 --- a/src/main/java/g0001_0100/s0038_count_and_say/readme.md +++ b/src/main/java/g0001_0100/s0038_count_and_say/readme.md @@ -11,7 +11,7 @@ To determine how you "say" a digit string, split it into the **minimal** number For example, the saying and conversion for digit string `"3322251"`: -![](https://assets.leetcode.com/uploads/2020/10/23/countandsay.jpg) +![](countandsay.jpg) Given a positive integer `n`, return _the_ `nth` _term of the **count-and-say** sequence_. diff --git a/src/main/java/g0001_0100/s0042_trapping_rain_water/rainwatertrap.png b/src/main/java/g0001_0100/s0042_trapping_rain_water/rainwatertrap.png new file mode 100644 index 000000000..578e81ebe Binary files /dev/null and b/src/main/java/g0001_0100/s0042_trapping_rain_water/rainwatertrap.png differ diff --git a/src/main/java/g0001_0100/s0042_trapping_rain_water/readme.md b/src/main/java/g0001_0100/s0042_trapping_rain_water/readme.md index 2e839c06a..9c66075af 100644 --- a/src/main/java/g0001_0100/s0042_trapping_rain_water/readme.md +++ b/src/main/java/g0001_0100/s0042_trapping_rain_water/readme.md @@ -6,7 +6,7 @@ Given `n` non-negative integers representing an elevation map where the width of **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/22/rainwatertrap.png) +![](rainwatertrap.png) **Input:** height = [0,1,0,2,1,0,1,3,2,1,2,1] diff --git a/src/main/java/g0001_0100/s0048_rotate_image/mat1.jpg b/src/main/java/g0001_0100/s0048_rotate_image/mat1.jpg new file mode 100644 index 000000000..7a5ce3f5f Binary files /dev/null and b/src/main/java/g0001_0100/s0048_rotate_image/mat1.jpg differ diff --git a/src/main/java/g0001_0100/s0048_rotate_image/mat2.jpg b/src/main/java/g0001_0100/s0048_rotate_image/mat2.jpg new file mode 100644 index 000000000..08600a2d5 Binary files /dev/null and b/src/main/java/g0001_0100/s0048_rotate_image/mat2.jpg differ diff --git a/src/main/java/g0001_0100/s0048_rotate_image/readme.md b/src/main/java/g0001_0100/s0048_rotate_image/readme.md index 9c58ae342..761d4aede 100644 --- a/src/main/java/g0001_0100/s0048_rotate_image/readme.md +++ b/src/main/java/g0001_0100/s0048_rotate_image/readme.md @@ -8,7 +8,7 @@ You have to rotate the image [**in-place**](https://en.wikipedia.org/wiki/In-pla **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/28/mat1.jpg) +![](mat1.jpg) **Input:** matrix = [[1,2,3],[4,5,6],[7,8,9]] @@ -16,7 +16,7 @@ You have to rotate the image [**in-place**](https://en.wikipedia.org/wiki/In-pla **Example 2:** -![](https://assets.leetcode.com/uploads/2020/08/28/mat2.jpg) +![](mat2.jpg) **Input:** matrix = [[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]] diff --git a/src/main/java/g0001_0100/s0051_n_queens/queens.jpg b/src/main/java/g0001_0100/s0051_n_queens/queens.jpg new file mode 100644 index 000000000..2e6f30ecd Binary files /dev/null and b/src/main/java/g0001_0100/s0051_n_queens/queens.jpg differ diff --git a/src/main/java/g0001_0100/s0051_n_queens/readme.md b/src/main/java/g0001_0100/s0051_n_queens/readme.md index 56be2333b..6837a8ab4 100644 --- a/src/main/java/g0001_0100/s0051_n_queens/readme.md +++ b/src/main/java/g0001_0100/s0051_n_queens/readme.md @@ -10,7 +10,7 @@ Each solution contains a distinct board configuration of the n-queens' placement **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/13/queens.jpg) +![](queens.jpg) **Input:** n = 4 diff --git a/src/main/java/g0001_0100/s0052_n_queens_ii/queens.jpg b/src/main/java/g0001_0100/s0052_n_queens_ii/queens.jpg new file mode 100644 index 000000000..2e6f30ecd Binary files /dev/null and b/src/main/java/g0001_0100/s0052_n_queens_ii/queens.jpg differ diff --git a/src/main/java/g0001_0100/s0052_n_queens_ii/readme.md b/src/main/java/g0001_0100/s0052_n_queens_ii/readme.md index 946096cfc..b3bb633ec 100644 --- a/src/main/java/g0001_0100/s0052_n_queens_ii/readme.md +++ b/src/main/java/g0001_0100/s0052_n_queens_ii/readme.md @@ -8,7 +8,7 @@ Given an integer `n`, return _the number of distinct solutions to the **n-queens **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/13/queens.jpg) +![](queens.jpg) **Input:** n = 4 diff --git a/src/main/java/g0001_0100/s0054_spiral_matrix/readme.md b/src/main/java/g0001_0100/s0054_spiral_matrix/readme.md index 75abbda98..feb23408b 100644 --- a/src/main/java/g0001_0100/s0054_spiral_matrix/readme.md +++ b/src/main/java/g0001_0100/s0054_spiral_matrix/readme.md @@ -6,7 +6,7 @@ Given an `m x n` `matrix`, return _all elements of the_ `matrix` _in spiral orde **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/13/spiral1.jpg) +![](spiral1.jpg) **Input:** matrix = [[1,2,3],[4,5,6],[7,8,9]] @@ -14,7 +14,7 @@ Given an `m x n` `matrix`, return _all elements of the_ `matrix` _in spiral orde **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/13/spiral.jpg) +![](spiral.jpg) **Input:** matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]] diff --git a/src/main/java/g0001_0100/s0054_spiral_matrix/spiral.jpg b/src/main/java/g0001_0100/s0054_spiral_matrix/spiral.jpg new file mode 100644 index 000000000..948e0f53a Binary files /dev/null and b/src/main/java/g0001_0100/s0054_spiral_matrix/spiral.jpg differ diff --git a/src/main/java/g0001_0100/s0054_spiral_matrix/spiral1.jpg b/src/main/java/g0001_0100/s0054_spiral_matrix/spiral1.jpg new file mode 100644 index 000000000..3f7ea45d1 Binary files /dev/null and b/src/main/java/g0001_0100/s0054_spiral_matrix/spiral1.jpg differ diff --git a/src/main/java/g0001_0100/s0059_spiral_matrix_ii/readme.md b/src/main/java/g0001_0100/s0059_spiral_matrix_ii/readme.md index 51b104944..5f664b76a 100644 --- a/src/main/java/g0001_0100/s0059_spiral_matrix_ii/readme.md +++ b/src/main/java/g0001_0100/s0059_spiral_matrix_ii/readme.md @@ -6,7 +6,7 @@ Given a positive integer `n`, generate an `n x n` `matrix` filled with elements **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/13/spiraln.jpg) +![](spiraln.jpg) **Input:** n = 3 diff --git a/src/main/java/g0001_0100/s0059_spiral_matrix_ii/spiraln.jpg b/src/main/java/g0001_0100/s0059_spiral_matrix_ii/spiraln.jpg new file mode 100644 index 000000000..25564dd71 Binary files /dev/null and b/src/main/java/g0001_0100/s0059_spiral_matrix_ii/spiraln.jpg differ diff --git a/src/main/java/g0001_0100/s0061_rotate_list/readme.md b/src/main/java/g0001_0100/s0061_rotate_list/readme.md index f9cce525d..6f67fb6bc 100644 --- a/src/main/java/g0001_0100/s0061_rotate_list/readme.md +++ b/src/main/java/g0001_0100/s0061_rotate_list/readme.md @@ -6,7 +6,7 @@ Given the `head` of a linked list, rotate the list to the right by `k` places. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/13/rotate1.jpg) +![](rotate1.jpg) **Input:** head = [1,2,3,4,5], k = 2 @@ -14,7 +14,7 @@ Given the `head` of a linked list, rotate the list to the right by `k` places. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/13/roate2.jpg) +![](roate2.jpg) **Input:** head = [0,1,2], k = 4 diff --git a/src/main/java/g0001_0100/s0061_rotate_list/roate2.jpg b/src/main/java/g0001_0100/s0061_rotate_list/roate2.jpg new file mode 100644 index 000000000..2a39f4c58 Binary files /dev/null and b/src/main/java/g0001_0100/s0061_rotate_list/roate2.jpg differ diff --git a/src/main/java/g0001_0100/s0061_rotate_list/rotate1.jpg b/src/main/java/g0001_0100/s0061_rotate_list/rotate1.jpg new file mode 100644 index 000000000..28769b0ea Binary files /dev/null and b/src/main/java/g0001_0100/s0061_rotate_list/rotate1.jpg differ diff --git a/src/main/java/g0001_0100/s0062_unique_paths/readme.md b/src/main/java/g0001_0100/s0062_unique_paths/readme.md index 31699d919..34ce6c65d 100644 --- a/src/main/java/g0001_0100/s0062_unique_paths/readme.md +++ b/src/main/java/g0001_0100/s0062_unique_paths/readme.md @@ -10,7 +10,7 @@ How many possible unique paths are there? **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png) +![](robot_maze.png) **Input:** m = 3, n = 7 diff --git a/src/main/java/g0001_0100/s0062_unique_paths/robot_maze.png b/src/main/java/g0001_0100/s0062_unique_paths/robot_maze.png new file mode 100644 index 000000000..ebcd2dce4 Binary files /dev/null and b/src/main/java/g0001_0100/s0062_unique_paths/robot_maze.png differ diff --git a/src/main/java/g0001_0100/s0063_unique_paths_ii/readme.md b/src/main/java/g0001_0100/s0063_unique_paths_ii/readme.md index 2d511b1af..280506f12 100644 --- a/src/main/java/g0001_0100/s0063_unique_paths_ii/readme.md +++ b/src/main/java/g0001_0100/s0063_unique_paths_ii/readme.md @@ -12,7 +12,7 @@ An obstacle and space is marked as `1` and `0` respectively in the grid. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/04/robot1.jpg) +![](robot1.jpg) **Input:** obstacleGrid = [[0,0,0],[0,1,0],[0,0,0]] @@ -22,7 +22,7 @@ An obstacle and space is marked as `1` and `0` respectively in the grid. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/04/robot2.jpg) +![](robot2.jpg) **Input:** obstacleGrid = [[0,1],[0,0]] diff --git a/src/main/java/g0001_0100/s0063_unique_paths_ii/robot1.jpg b/src/main/java/g0001_0100/s0063_unique_paths_ii/robot1.jpg new file mode 100644 index 000000000..9aa9b4b42 Binary files /dev/null and b/src/main/java/g0001_0100/s0063_unique_paths_ii/robot1.jpg differ diff --git a/src/main/java/g0001_0100/s0063_unique_paths_ii/robot2.jpg b/src/main/java/g0001_0100/s0063_unique_paths_ii/robot2.jpg new file mode 100644 index 000000000..9e754f0b4 Binary files /dev/null and b/src/main/java/g0001_0100/s0063_unique_paths_ii/robot2.jpg differ diff --git a/src/main/java/g0001_0100/s0064_minimum_path_sum/minpath.jpg b/src/main/java/g0001_0100/s0064_minimum_path_sum/minpath.jpg new file mode 100644 index 000000000..301be95be Binary files /dev/null and b/src/main/java/g0001_0100/s0064_minimum_path_sum/minpath.jpg differ diff --git a/src/main/java/g0001_0100/s0064_minimum_path_sum/readme.md b/src/main/java/g0001_0100/s0064_minimum_path_sum/readme.md index 4882401bd..05dd1fdbd 100644 --- a/src/main/java/g0001_0100/s0064_minimum_path_sum/readme.md +++ b/src/main/java/g0001_0100/s0064_minimum_path_sum/readme.md @@ -8,7 +8,7 @@ Given a `m x n` `grid` filled with non-negative numbers, find a path from top le **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/05/minpath.jpg) +![](minpath.jpg) **Input:** grid = [[1,3,1],[1,5,1],[4,2,1]] diff --git a/src/main/java/g0001_0100/s0073_set_matrix_zeroes/mat1.jpg b/src/main/java/g0001_0100/s0073_set_matrix_zeroes/mat1.jpg new file mode 100644 index 000000000..cb796cc10 Binary files /dev/null and b/src/main/java/g0001_0100/s0073_set_matrix_zeroes/mat1.jpg differ diff --git a/src/main/java/g0001_0100/s0073_set_matrix_zeroes/mat2.jpg b/src/main/java/g0001_0100/s0073_set_matrix_zeroes/mat2.jpg new file mode 100644 index 000000000..959b37aba Binary files /dev/null and b/src/main/java/g0001_0100/s0073_set_matrix_zeroes/mat2.jpg differ diff --git a/src/main/java/g0001_0100/s0073_set_matrix_zeroes/readme.md b/src/main/java/g0001_0100/s0073_set_matrix_zeroes/readme.md index 41436eb78..ad844554f 100644 --- a/src/main/java/g0001_0100/s0073_set_matrix_zeroes/readme.md +++ b/src/main/java/g0001_0100/s0073_set_matrix_zeroes/readme.md @@ -8,7 +8,7 @@ You must do it [in place](https://en.wikipedia.org/wiki/In-place_algorithm). **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/17/mat1.jpg) +![](mat1.jpg) **Input:** matrix = [[1,1,1],[1,0,1],[1,1,1]] @@ -16,7 +16,7 @@ You must do it [in place](https://en.wikipedia.org/wiki/In-place_algorithm). **Example 2:** -![](https://assets.leetcode.com/uploads/2020/08/17/mat2.jpg) +![](mat2.jpg) **Input:** matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]] diff --git a/src/main/java/g0001_0100/s0074_search_a_2d_matrix/mat.jpg b/src/main/java/g0001_0100/s0074_search_a_2d_matrix/mat.jpg new file mode 100644 index 000000000..eab79ab47 Binary files /dev/null and b/src/main/java/g0001_0100/s0074_search_a_2d_matrix/mat.jpg differ diff --git a/src/main/java/g0001_0100/s0074_search_a_2d_matrix/mat2.jpg b/src/main/java/g0001_0100/s0074_search_a_2d_matrix/mat2.jpg new file mode 100644 index 000000000..7f6ec1552 Binary files /dev/null and b/src/main/java/g0001_0100/s0074_search_a_2d_matrix/mat2.jpg differ diff --git a/src/main/java/g0001_0100/s0074_search_a_2d_matrix/readme.md b/src/main/java/g0001_0100/s0074_search_a_2d_matrix/readme.md index ffe4e741a..86b586406 100644 --- a/src/main/java/g0001_0100/s0074_search_a_2d_matrix/readme.md +++ b/src/main/java/g0001_0100/s0074_search_a_2d_matrix/readme.md @@ -9,7 +9,7 @@ Write an efficient algorithm that searches for a value in an `m x n` matrix. Thi **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/05/mat.jpg) +![](mat.jpg) **Input:** matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3 @@ -17,7 +17,7 @@ Write an efficient algorithm that searches for a value in an `m x n` matrix. Thi **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/05/mat2.jpg) +![](mat2.jpg) **Input:** matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 13 diff --git a/src/main/java/g0001_0100/s0079_word_search/readme.md b/src/main/java/g0001_0100/s0079_word_search/readme.md index 763f004ab..cd452a522 100644 --- a/src/main/java/g0001_0100/s0079_word_search/readme.md +++ b/src/main/java/g0001_0100/s0079_word_search/readme.md @@ -8,7 +8,7 @@ The word can be constructed from letters of sequentially adjacent cells, where a **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/04/word2.jpg) +![](word2.jpg) **Input:** board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCCED" @@ -16,7 +16,7 @@ The word can be constructed from letters of sequentially adjacent cells, where a **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/04/word-1.jpg) +![](word-1.jpg) **Input:** board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "SEE" @@ -24,7 +24,7 @@ The word can be constructed from letters of sequentially adjacent cells, where a **Example 3:** -![](https://assets.leetcode.com/uploads/2020/10/15/word3.jpg) +![](word3.jpg) **Input:** board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCB" diff --git a/src/main/java/g0001_0100/s0079_word_search/word-1.jpg b/src/main/java/g0001_0100/s0079_word_search/word-1.jpg new file mode 100644 index 000000000..5bce8557c Binary files /dev/null and b/src/main/java/g0001_0100/s0079_word_search/word-1.jpg differ diff --git a/src/main/java/g0001_0100/s0079_word_search/word2.jpg b/src/main/java/g0001_0100/s0079_word_search/word2.jpg new file mode 100644 index 000000000..583f5a66f Binary files /dev/null and b/src/main/java/g0001_0100/s0079_word_search/word2.jpg differ diff --git a/src/main/java/g0001_0100/s0079_word_search/word3.jpg b/src/main/java/g0001_0100/s0079_word_search/word3.jpg new file mode 100644 index 000000000..5683faab8 Binary files /dev/null and b/src/main/java/g0001_0100/s0079_word_search/word3.jpg differ diff --git a/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/linkedlist1.jpg b/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/linkedlist1.jpg new file mode 100644 index 000000000..59c613e1e Binary files /dev/null and b/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/linkedlist1.jpg differ diff --git a/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/linkedlist2.jpg b/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/linkedlist2.jpg new file mode 100644 index 000000000..886e025aa Binary files /dev/null and b/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/linkedlist2.jpg differ diff --git a/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/readme.md b/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/readme.md index ec77e8059..fc56bd124 100644 --- a/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/readme.md +++ b/src/main/java/g0001_0100/s0082_remove_duplicates_from_sorted_list_ii/readme.md @@ -6,7 +6,7 @@ Given the `head` of a sorted linked list, _delete all nodes that have duplicate **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/04/linkedlist1.jpg) +![](linkedlist1.jpg) **Input:** head = [1,2,3,3,4,4,5] @@ -14,7 +14,7 @@ Given the `head` of a sorted linked list, _delete all nodes that have duplicate **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/04/linkedlist2.jpg) +![](linkedlist2.jpg) **Input:** head = [1,1,1,2,3] diff --git a/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/list1.jpg b/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/list1.jpg new file mode 100644 index 000000000..0a3b8e0ab Binary files /dev/null and b/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/list1.jpg differ diff --git a/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/list2.jpg b/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/list2.jpg new file mode 100644 index 000000000..945eb3c85 Binary files /dev/null and b/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/list2.jpg differ diff --git a/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/readme.md b/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/readme.md index fc8042207..eceaae09c 100644 --- a/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/readme.md +++ b/src/main/java/g0001_0100/s0083_remove_duplicates_from_sorted_list/readme.md @@ -6,7 +6,7 @@ Given the `head` of a sorted linked list, _delete all duplicates such that each **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/04/list1.jpg) +![](list1.jpg) **Input:** head = [1,1,2] @@ -14,7 +14,7 @@ Given the `head` of a sorted linked list, _delete all duplicates such that each **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/04/list2.jpg) +![](list2.jpg) **Input:** head = [1,1,2,3,3] diff --git a/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/histogram-1.jpg b/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/histogram-1.jpg new file mode 100644 index 000000000..2d1e6d344 Binary files /dev/null and b/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/histogram-1.jpg differ diff --git a/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/histogram.jpg b/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/histogram.jpg new file mode 100644 index 000000000..3e9fc83a9 Binary files /dev/null and b/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/histogram.jpg differ diff --git a/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/readme.md b/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/readme.md index cda2a9dcb..8b6998f93 100644 --- a/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/readme.md +++ b/src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram/readme.md @@ -6,7 +6,7 @@ Given an array of integers `heights` representing the histogram's bar height whe **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/04/histogram.jpg) +![](histogram.jpg) **Input:** heights = [2,1,5,6,2,3] @@ -16,7 +16,7 @@ Given an array of integers `heights` representing the histogram's bar height whe **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/04/histogram-1.jpg) +![](histogram-1.jpg) **Input:** heights = [2,4] diff --git a/src/main/java/g0001_0100/s0085_maximal_rectangle/maximal.jpg b/src/main/java/g0001_0100/s0085_maximal_rectangle/maximal.jpg new file mode 100644 index 000000000..ef83d1eba Binary files /dev/null and b/src/main/java/g0001_0100/s0085_maximal_rectangle/maximal.jpg differ diff --git a/src/main/java/g0001_0100/s0085_maximal_rectangle/readme.md b/src/main/java/g0001_0100/s0085_maximal_rectangle/readme.md index 5dd4dde98..fee478155 100644 --- a/src/main/java/g0001_0100/s0085_maximal_rectangle/readme.md +++ b/src/main/java/g0001_0100/s0085_maximal_rectangle/readme.md @@ -6,7 +6,7 @@ Given a `rows x cols` binary `matrix` filled with `0`'s and `1`'s, find the larg **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/14/maximal.jpg) +![](maximal.jpg) **Input:** matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]] diff --git a/src/main/java/g0001_0100/s0086_partition_list/partition.jpg b/src/main/java/g0001_0100/s0086_partition_list/partition.jpg new file mode 100644 index 000000000..1fa732c4b Binary files /dev/null and b/src/main/java/g0001_0100/s0086_partition_list/partition.jpg differ diff --git a/src/main/java/g0001_0100/s0086_partition_list/readme.md b/src/main/java/g0001_0100/s0086_partition_list/readme.md index eafe899ba..5ad0106e0 100644 --- a/src/main/java/g0001_0100/s0086_partition_list/readme.md +++ b/src/main/java/g0001_0100/s0086_partition_list/readme.md @@ -8,7 +8,7 @@ You should **preserve** the original relative order of the nodes in each of the **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/04/partition.jpg) +![](partition.jpg) **Input:** head = [1,4,3,2,5,2], x = 3 diff --git a/src/main/java/g0001_0100/s0092_reverse_linked_list_ii/readme.md b/src/main/java/g0001_0100/s0092_reverse_linked_list_ii/readme.md index f5575f0be..dde54d02f 100644 --- a/src/main/java/g0001_0100/s0092_reverse_linked_list_ii/readme.md +++ b/src/main/java/g0001_0100/s0092_reverse_linked_list_ii/readme.md @@ -6,7 +6,7 @@ Given the `head` of a singly linked list and two integers `left` and `right` whe **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/rev2ex2.jpg) +![](rev2ex2.jpg) **Input:** head = [1,2,3,4,5], left = 2, right = 4 diff --git a/src/main/java/g0001_0100/s0092_reverse_linked_list_ii/rev2ex2.jpg b/src/main/java/g0001_0100/s0092_reverse_linked_list_ii/rev2ex2.jpg new file mode 100644 index 000000000..aa2971801 Binary files /dev/null and b/src/main/java/g0001_0100/s0092_reverse_linked_list_ii/rev2ex2.jpg differ diff --git a/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_1.jpg b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_1.jpg new file mode 100644 index 000000000..032c3ee64 Binary files /dev/null and b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_1.jpg differ diff --git a/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_4.jpg b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_4.jpg new file mode 100644 index 000000000..e80c83597 Binary files /dev/null and b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_4.jpg differ diff --git a/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_5.jpg b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_5.jpg new file mode 100644 index 000000000..d824cb48a Binary files /dev/null and b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/inorder_5.jpg differ diff --git a/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/readme.md b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/readme.md index 99fb9f158..ea3de51fe 100644 --- a/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/readme.md +++ b/src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the inorder traversal of its nodes' v **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/15/inorder_1.jpg) +![](inorder_1.jpg) **Input:** root = [1,null,2,3] @@ -26,7 +26,7 @@ Given the `root` of a binary tree, return _the inorder traversal of its nodes' v **Example 4:** -![](https://assets.leetcode.com/uploads/2020/09/15/inorder_5.jpg) +![](inorder_5.jpg) **Input:** root = [1,2] @@ -34,7 +34,7 @@ Given the `root` of a binary tree, return _the inorder traversal of its nodes' v **Example 5:** -![](https://assets.leetcode.com/uploads/2020/09/15/inorder_4.jpg) +![](inorder_4.jpg) **Input:** root = [1,null,2] diff --git a/src/main/java/g0001_0100/s0095_unique_binary_search_trees_ii/readme.md b/src/main/java/g0001_0100/s0095_unique_binary_search_trees_ii/readme.md index bab97bfba..093fc8d67 100644 --- a/src/main/java/g0001_0100/s0095_unique_binary_search_trees_ii/readme.md +++ b/src/main/java/g0001_0100/s0095_unique_binary_search_trees_ii/readme.md @@ -6,7 +6,7 @@ Given an integer `n`, return _all the structurally unique **BST'**s (binary sear **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/18/uniquebstn3.jpg) +![](uniquebstn3.jpg) **Input:** n = 3 diff --git a/src/main/java/g0001_0100/s0095_unique_binary_search_trees_ii/uniquebstn3.jpg b/src/main/java/g0001_0100/s0095_unique_binary_search_trees_ii/uniquebstn3.jpg new file mode 100644 index 000000000..89847b238 Binary files /dev/null and b/src/main/java/g0001_0100/s0095_unique_binary_search_trees_ii/uniquebstn3.jpg differ diff --git a/src/main/java/g0001_0100/s0096_unique_binary_search_trees/readme.md b/src/main/java/g0001_0100/s0096_unique_binary_search_trees/readme.md index 2119633ad..d82baaac5 100644 --- a/src/main/java/g0001_0100/s0096_unique_binary_search_trees/readme.md +++ b/src/main/java/g0001_0100/s0096_unique_binary_search_trees/readme.md @@ -6,7 +6,7 @@ Given an integer `n`, return _the number of structurally unique **BST'**s (binar **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/18/uniquebstn3.jpg) +![](uniquebstn3.jpg) **Input:** n = 3 diff --git a/src/main/java/g0001_0100/s0096_unique_binary_search_trees/uniquebstn3.jpg b/src/main/java/g0001_0100/s0096_unique_binary_search_trees/uniquebstn3.jpg new file mode 100644 index 000000000..89847b238 Binary files /dev/null and b/src/main/java/g0001_0100/s0096_unique_binary_search_trees/uniquebstn3.jpg differ diff --git a/src/main/java/g0001_0100/s0097_interleaving_string/interleave.jpg b/src/main/java/g0001_0100/s0097_interleaving_string/interleave.jpg new file mode 100644 index 000000000..02f2b540e Binary files /dev/null and b/src/main/java/g0001_0100/s0097_interleaving_string/interleave.jpg differ diff --git a/src/main/java/g0001_0100/s0097_interleaving_string/readme.md b/src/main/java/g0001_0100/s0097_interleaving_string/readme.md index 613d1d5ed..4db7db6a7 100644 --- a/src/main/java/g0001_0100/s0097_interleaving_string/readme.md +++ b/src/main/java/g0001_0100/s0097_interleaving_string/readme.md @@ -15,7 +15,7 @@ An **interleaving** of two strings `s` and `t` is a configuration where they are **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/02/interleave.jpg) +![](interleave.jpg) **Input:** s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac" diff --git a/src/main/java/g0001_0100/s0098_validate_binary_search_tree/readme.md b/src/main/java/g0001_0100/s0098_validate_binary_search_tree/readme.md index 7faf88cd5..bffc64f2f 100644 --- a/src/main/java/g0001_0100/s0098_validate_binary_search_tree/readme.md +++ b/src/main/java/g0001_0100/s0098_validate_binary_search_tree/readme.md @@ -12,7 +12,7 @@ A **valid BST** is defined as follows: **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/01/tree1.jpg) +![](tree1.jpg) **Input:** root = [2,1,3] @@ -20,7 +20,7 @@ A **valid BST** is defined as follows: **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/01/tree2.jpg) +![](tree2.jpg) **Input:** root = [5,1,4,null,null,3,6] diff --git a/src/main/java/g0001_0100/s0098_validate_binary_search_tree/tree1.jpg b/src/main/java/g0001_0100/s0098_validate_binary_search_tree/tree1.jpg new file mode 100644 index 000000000..88728f241 Binary files /dev/null and b/src/main/java/g0001_0100/s0098_validate_binary_search_tree/tree1.jpg differ diff --git a/src/main/java/g0001_0100/s0098_validate_binary_search_tree/tree2.jpg b/src/main/java/g0001_0100/s0098_validate_binary_search_tree/tree2.jpg new file mode 100644 index 000000000..0f55bcecc Binary files /dev/null and b/src/main/java/g0001_0100/s0098_validate_binary_search_tree/tree2.jpg differ diff --git a/src/main/java/g0001_0100/s0099_recover_binary_search_tree/readme.md b/src/main/java/g0001_0100/s0099_recover_binary_search_tree/readme.md index 2e02463ac..e7c471209 100644 --- a/src/main/java/g0001_0100/s0099_recover_binary_search_tree/readme.md +++ b/src/main/java/g0001_0100/s0099_recover_binary_search_tree/readme.md @@ -6,7 +6,7 @@ You are given the `root` of a binary search tree (BST), where the values of **ex **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/28/recover1.jpg) +![](recover1.jpg) **Input:** root = [1,3,null,null,2] @@ -16,7 +16,7 @@ You are given the `root` of a binary search tree (BST), where the values of **ex **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/28/recover2.jpg) +![](recover2.jpg) **Input:** root = [3,1,4,null,null,2] diff --git a/src/main/java/g0001_0100/s0099_recover_binary_search_tree/recover1.jpg b/src/main/java/g0001_0100/s0099_recover_binary_search_tree/recover1.jpg new file mode 100644 index 000000000..f95ab3f0c Binary files /dev/null and b/src/main/java/g0001_0100/s0099_recover_binary_search_tree/recover1.jpg differ diff --git a/src/main/java/g0001_0100/s0099_recover_binary_search_tree/recover2.jpg b/src/main/java/g0001_0100/s0099_recover_binary_search_tree/recover2.jpg new file mode 100644 index 000000000..f23c1e9da Binary files /dev/null and b/src/main/java/g0001_0100/s0099_recover_binary_search_tree/recover2.jpg differ diff --git a/src/main/java/g0001_0100/s0100_same_tree/ex1.jpg b/src/main/java/g0001_0100/s0100_same_tree/ex1.jpg new file mode 100644 index 000000000..6d9d16f36 Binary files /dev/null and b/src/main/java/g0001_0100/s0100_same_tree/ex1.jpg differ diff --git a/src/main/java/g0001_0100/s0100_same_tree/ex2.jpg b/src/main/java/g0001_0100/s0100_same_tree/ex2.jpg new file mode 100644 index 000000000..aff121eb5 Binary files /dev/null and b/src/main/java/g0001_0100/s0100_same_tree/ex2.jpg differ diff --git a/src/main/java/g0001_0100/s0100_same_tree/ex3.jpg b/src/main/java/g0001_0100/s0100_same_tree/ex3.jpg new file mode 100644 index 000000000..b69b001e0 Binary files /dev/null and b/src/main/java/g0001_0100/s0100_same_tree/ex3.jpg differ diff --git a/src/main/java/g0001_0100/s0100_same_tree/readme.md b/src/main/java/g0001_0100/s0100_same_tree/readme.md index 0172a5654..fa179f321 100644 --- a/src/main/java/g0001_0100/s0100_same_tree/readme.md +++ b/src/main/java/g0001_0100/s0100_same_tree/readme.md @@ -8,7 +8,7 @@ Two binary trees are considered the same if they are structurally identical, and **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/20/ex1.jpg) +![](ex1.jpg) **Input:** p = [1,2,3], q = [1,2,3] @@ -16,7 +16,7 @@ Two binary trees are considered the same if they are structurally identical, and **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/20/ex2.jpg) +![](ex2.jpg) **Input:** p = [1,2], q = [1,null,2] @@ -24,7 +24,7 @@ Two binary trees are considered the same if they are structurally identical, and **Example 3:** -![](https://assets.leetcode.com/uploads/2020/12/20/ex3.jpg) +![](ex3.jpg) **Input:** p = [1,2,1], q = [1,1,2] diff --git a/src/main/java/g0101_0200/s0101_symmetric_tree/readme.md b/src/main/java/g0101_0200/s0101_symmetric_tree/readme.md index 67d1bf168..6332e1267 100644 --- a/src/main/java/g0101_0200/s0101_symmetric_tree/readme.md +++ b/src/main/java/g0101_0200/s0101_symmetric_tree/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, _check whether it is a mirror of itself_ (i.e **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/symtree1.jpg) +![](symtree1.jpg) **Input:** root = [1,2,2,3,4,4,3] @@ -14,7 +14,7 @@ Given the `root` of a binary tree, _check whether it is a mirror of itself_ (i.e **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/19/symtree2.jpg) +![](symtree2.jpg) **Input:** root = [1,2,2,null,3,null,3] diff --git a/src/main/java/g0101_0200/s0101_symmetric_tree/symtree1.jpg b/src/main/java/g0101_0200/s0101_symmetric_tree/symtree1.jpg new file mode 100644 index 000000000..bd9b52121 Binary files /dev/null and b/src/main/java/g0101_0200/s0101_symmetric_tree/symtree1.jpg differ diff --git a/src/main/java/g0101_0200/s0101_symmetric_tree/symtree2.jpg b/src/main/java/g0101_0200/s0101_symmetric_tree/symtree2.jpg new file mode 100644 index 000000000..4dcb63046 Binary files /dev/null and b/src/main/java/g0101_0200/s0101_symmetric_tree/symtree2.jpg differ diff --git a/src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal/readme.md b/src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal/readme.md index 509970383..e416cce90 100644 --- a/src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal/readme.md +++ b/src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the level order traversal of its node **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/tree1.jpg) +![](tree1.jpg) **Input:** root = [3,9,20,null,null,15,7] diff --git a/src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal/tree1.jpg b/src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal/tree1.jpg new file mode 100644 index 000000000..75ad615e0 Binary files /dev/null and b/src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal/tree1.jpg differ diff --git a/src/main/java/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/readme.md b/src/main/java/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/readme.md index 3442925c4..e2666283e 100644 --- a/src/main/java/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/readme.md +++ b/src/main/java/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the zigzag level order traversal of i **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/tree1.jpg) +![](tree1.jpg) **Input:** root = [3,9,20,null,null,15,7] diff --git a/src/main/java/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/tree1.jpg b/src/main/java/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/tree1.jpg new file mode 100644 index 000000000..75ad615e0 Binary files /dev/null and b/src/main/java/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/tree1.jpg differ diff --git a/src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree/readme.md b/src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree/readme.md index aadf2c137..140522dfc 100644 --- a/src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree/readme.md +++ b/src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree/readme.md @@ -8,7 +8,7 @@ A binary tree's **maximum depth** is the number of nodes along the longest path **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/26/tmp-tree.jpg) +![](tmp-tree.jpg) **Input:** root = [3,9,20,null,null,15,7] diff --git a/src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree/tmp-tree.jpg b/src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree/tmp-tree.jpg new file mode 100644 index 000000000..2e654bc91 Binary files /dev/null and b/src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree/tmp-tree.jpg differ diff --git a/src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/readme.md b/src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/readme.md index ffa185d1f..4ccaf6264 100644 --- a/src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/readme.md +++ b/src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/readme.md @@ -6,7 +6,7 @@ Given two integer arrays `preorder` and `inorder` where `preorder` is the preord **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/tree.jpg) +![](tree.jpg) **Input:** preorder = [3,9,20,15,7], inorder = [9,3,15,20,7] diff --git a/src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/tree.jpg b/src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/tree.jpg new file mode 100644 index 000000000..767ce8ce9 Binary files /dev/null and b/src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/tree.jpg differ diff --git a/src/main/java/g0101_0200/s0106_construct_binary_tree_from_inorder_and_postorder_traversal/readme.md b/src/main/java/g0101_0200/s0106_construct_binary_tree_from_inorder_and_postorder_traversal/readme.md index d4b687735..e3dd18887 100644 --- a/src/main/java/g0101_0200/s0106_construct_binary_tree_from_inorder_and_postorder_traversal/readme.md +++ b/src/main/java/g0101_0200/s0106_construct_binary_tree_from_inorder_and_postorder_traversal/readme.md @@ -6,7 +6,7 @@ Given two integer arrays `inorder` and `postorder` where `inorder` is the inorde **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/tree.jpg) +![](tree.jpg) **Input:** inorder = [9,3,15,20,7], postorder = [9,15,7,20,3] diff --git a/src/main/java/g0101_0200/s0106_construct_binary_tree_from_inorder_and_postorder_traversal/tree.jpg b/src/main/java/g0101_0200/s0106_construct_binary_tree_from_inorder_and_postorder_traversal/tree.jpg new file mode 100644 index 000000000..767ce8ce9 Binary files /dev/null and b/src/main/java/g0101_0200/s0106_construct_binary_tree_from_inorder_and_postorder_traversal/tree.jpg differ diff --git a/src/main/java/g0101_0200/s0107_binary_tree_level_order_traversal_ii/readme.md b/src/main/java/g0101_0200/s0107_binary_tree_level_order_traversal_ii/readme.md index b23bc4b48..0a4b699a1 100644 --- a/src/main/java/g0101_0200/s0107_binary_tree_level_order_traversal_ii/readme.md +++ b/src/main/java/g0101_0200/s0107_binary_tree_level_order_traversal_ii/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the bottom-up level order traversal o **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/tree1.jpg) +![](tree1.jpg) **Input:** root = [3,9,20,null,null,15,7] diff --git a/src/main/java/g0101_0200/s0107_binary_tree_level_order_traversal_ii/tree1.jpg b/src/main/java/g0101_0200/s0107_binary_tree_level_order_traversal_ii/tree1.jpg new file mode 100644 index 000000000..75ad615e0 Binary files /dev/null and b/src/main/java/g0101_0200/s0107_binary_tree_level_order_traversal_ii/tree1.jpg differ diff --git a/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree.jpg b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree.jpg new file mode 100644 index 000000000..570db3449 Binary files /dev/null and b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree.jpg differ diff --git a/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree1.jpg b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree1.jpg new file mode 100644 index 000000000..201989217 Binary files /dev/null and b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree1.jpg differ diff --git a/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree2.jpg b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree2.jpg new file mode 100644 index 000000000..ca1b4feb2 Binary files /dev/null and b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/btree2.jpg differ diff --git a/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/readme.md b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/readme.md index c5c6a1ef7..cf1f9c7ec 100644 --- a/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/readme.md +++ b/src/main/java/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/readme.md @@ -8,17 +8,17 @@ A **height-balanced** binary tree is a binary tree in which the depth of the two **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/18/btree1.jpg) +![](btree1.jpg) **Input:** nums = [-10,-3,0,5,9] **Output:** [0,-3,9,-10,null,5] -**Explanation:** [0,-10,5,null,-3,null,9] is also accepted: ![](https://assets.leetcode.com/uploads/2021/02/18/btree2.jpg) +**Explanation:** [0,-10,5,null,-3,null,9] is also accepted: ![](btree2.jpg) **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/18/btree.jpg) +![](btree.jpg) **Input:** nums = [1,3] diff --git a/src/main/java/g0101_0200/s0109_convert_sorted_list_to_binary_search_tree/linked.jpg b/src/main/java/g0101_0200/s0109_convert_sorted_list_to_binary_search_tree/linked.jpg new file mode 100644 index 000000000..ae3c334b4 Binary files /dev/null and b/src/main/java/g0101_0200/s0109_convert_sorted_list_to_binary_search_tree/linked.jpg differ diff --git a/src/main/java/g0101_0200/s0109_convert_sorted_list_to_binary_search_tree/readme.md b/src/main/java/g0101_0200/s0109_convert_sorted_list_to_binary_search_tree/readme.md index f75e51680..222936954 100644 --- a/src/main/java/g0101_0200/s0109_convert_sorted_list_to_binary_search_tree/readme.md +++ b/src/main/java/g0101_0200/s0109_convert_sorted_list_to_binary_search_tree/readme.md @@ -8,7 +8,7 @@ For this problem, a height-balanced binary tree is defined as a binary tree in w **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/17/linked.jpg) +![](linked.jpg) **Input:** head = [-10,-3,0,5,9] diff --git a/src/main/java/g0101_0200/s0110_balanced_binary_tree/balance_1.jpg b/src/main/java/g0101_0200/s0110_balanced_binary_tree/balance_1.jpg new file mode 100644 index 000000000..fe2734074 Binary files /dev/null and b/src/main/java/g0101_0200/s0110_balanced_binary_tree/balance_1.jpg differ diff --git a/src/main/java/g0101_0200/s0110_balanced_binary_tree/balance_2.jpg b/src/main/java/g0101_0200/s0110_balanced_binary_tree/balance_2.jpg new file mode 100644 index 000000000..3c84fb9c8 Binary files /dev/null and b/src/main/java/g0101_0200/s0110_balanced_binary_tree/balance_2.jpg differ diff --git a/src/main/java/g0101_0200/s0110_balanced_binary_tree/readme.md b/src/main/java/g0101_0200/s0110_balanced_binary_tree/readme.md index 10905d09f..2dd88ae23 100644 --- a/src/main/java/g0101_0200/s0110_balanced_binary_tree/readme.md +++ b/src/main/java/g0101_0200/s0110_balanced_binary_tree/readme.md @@ -10,7 +10,7 @@ For this problem, a height-balanced binary tree is defined as: **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/06/balance_1.jpg) +![](balance_1.jpg) **Input:** root = [3,9,20,null,null,15,7] @@ -18,7 +18,7 @@ For this problem, a height-balanced binary tree is defined as: **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/06/balance_2.jpg) +![](balance_2.jpg) **Input:** root = [1,2,2,3,3,null,null,4,4] diff --git a/src/main/java/g0101_0200/s0111_minimum_depth_of_binary_tree/ex_depth.jpg b/src/main/java/g0101_0200/s0111_minimum_depth_of_binary_tree/ex_depth.jpg new file mode 100644 index 000000000..ad30223c0 Binary files /dev/null and b/src/main/java/g0101_0200/s0111_minimum_depth_of_binary_tree/ex_depth.jpg differ diff --git a/src/main/java/g0101_0200/s0111_minimum_depth_of_binary_tree/readme.md b/src/main/java/g0101_0200/s0111_minimum_depth_of_binary_tree/readme.md index 9583ec570..944192b24 100644 --- a/src/main/java/g0101_0200/s0111_minimum_depth_of_binary_tree/readme.md +++ b/src/main/java/g0101_0200/s0111_minimum_depth_of_binary_tree/readme.md @@ -10,7 +10,7 @@ The minimum depth is the number of nodes along the shortest path from the root n **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/12/ex_depth.jpg) +![](ex_depth.jpg) **Input:** root = [3,9,20,null,null,15,7] diff --git a/src/main/java/g0101_0200/s0112_path_sum/pathsum1.jpg b/src/main/java/g0101_0200/s0112_path_sum/pathsum1.jpg new file mode 100644 index 000000000..06a2640c5 Binary files /dev/null and b/src/main/java/g0101_0200/s0112_path_sum/pathsum1.jpg differ diff --git a/src/main/java/g0101_0200/s0112_path_sum/pathsum2.jpg b/src/main/java/g0101_0200/s0112_path_sum/pathsum2.jpg new file mode 100644 index 000000000..06dd9c932 Binary files /dev/null and b/src/main/java/g0101_0200/s0112_path_sum/pathsum2.jpg differ diff --git a/src/main/java/g0101_0200/s0112_path_sum/readme.md b/src/main/java/g0101_0200/s0112_path_sum/readme.md index 9402da46f..8a28dd863 100644 --- a/src/main/java/g0101_0200/s0112_path_sum/readme.md +++ b/src/main/java/g0101_0200/s0112_path_sum/readme.md @@ -8,7 +8,7 @@ A **leaf** is a node with no children. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/18/pathsum1.jpg) +![](pathsum1.jpg) **Input:** root = [5,4,8,11,null,13,4,7,2,null,null,null,1], targetSum = 22 @@ -16,7 +16,7 @@ A **leaf** is a node with no children. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/18/pathsum2.jpg) +![](pathsum2.jpg) **Input:** root = [1,2,3], targetSum = 5 diff --git a/src/main/java/g0101_0200/s0113_path_sum_ii/pathsum2.jpg b/src/main/java/g0101_0200/s0113_path_sum_ii/pathsum2.jpg new file mode 100644 index 000000000..06dd9c932 Binary files /dev/null and b/src/main/java/g0101_0200/s0113_path_sum_ii/pathsum2.jpg differ diff --git a/src/main/java/g0101_0200/s0113_path_sum_ii/pathsumii1.jpg b/src/main/java/g0101_0200/s0113_path_sum_ii/pathsumii1.jpg new file mode 100644 index 000000000..c57fb82f5 Binary files /dev/null and b/src/main/java/g0101_0200/s0113_path_sum_ii/pathsumii1.jpg differ diff --git a/src/main/java/g0101_0200/s0113_path_sum_ii/readme.md b/src/main/java/g0101_0200/s0113_path_sum_ii/readme.md index 58c45e203..f7e219358 100644 --- a/src/main/java/g0101_0200/s0113_path_sum_ii/readme.md +++ b/src/main/java/g0101_0200/s0113_path_sum_ii/readme.md @@ -8,7 +8,7 @@ A **root-to-leaf** path is a path starting from the root and ending at any leaf **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/18/pathsumii1.jpg) +![](pathsumii1.jpg) **Input:** root = [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum = 22 @@ -18,7 +18,7 @@ A **root-to-leaf** path is a path starting from the root and ending at any leaf **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/18/pathsum2.jpg) +![](pathsum2.jpg) **Input:** root = [1,2,3], targetSum = 5 diff --git a/src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list/flaten.jpg b/src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list/flaten.jpg new file mode 100644 index 000000000..d821192b4 Binary files /dev/null and b/src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list/flaten.jpg differ diff --git a/src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list/readme.md b/src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list/readme.md index 1cc08892d..974acf9cc 100644 --- a/src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list/readme.md +++ b/src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list/readme.md @@ -9,7 +9,7 @@ Given the `root` of a binary tree, flatten the tree into a "linked list": **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/14/flaten.jpg) +![](flaten.jpg) **Input:** root = [1,2,5,3,4,null,6] diff --git a/src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node/116_sample.png b/src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node/116_sample.png new file mode 100644 index 000000000..263393fbd Binary files /dev/null and b/src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node/116_sample.png differ diff --git a/src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node/readme.md b/src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node/readme.md index 1b327685d..f382b6677 100644 --- a/src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node/readme.md +++ b/src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node/readme.md @@ -12,7 +12,7 @@ Initially, all next pointers are set to `NULL`. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/02/14/116_sample.png) +![](116_sample.png) **Input:** root = [1,2,3,4,5,6,7] diff --git a/src/main/java/g0101_0200/s0117_populating_next_right_pointers_in_each_node_ii/117_sample.png b/src/main/java/g0101_0200/s0117_populating_next_right_pointers_in_each_node_ii/117_sample.png new file mode 100644 index 000000000..17aa3592e Binary files /dev/null and b/src/main/java/g0101_0200/s0117_populating_next_right_pointers_in_each_node_ii/117_sample.png differ diff --git a/src/main/java/g0101_0200/s0117_populating_next_right_pointers_in_each_node_ii/readme.md b/src/main/java/g0101_0200/s0117_populating_next_right_pointers_in_each_node_ii/readme.md index 0d5273405..8df0f5466 100644 --- a/src/main/java/g0101_0200/s0117_populating_next_right_pointers_in_each_node_ii/readme.md +++ b/src/main/java/g0101_0200/s0117_populating_next_right_pointers_in_each_node_ii/readme.md @@ -12,7 +12,7 @@ Initially, all next pointers are set to `NULL`. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/02/15/117_sample.png) +![](117_sample.png) **Input:** root = [1,2,3,4,5,null,7] diff --git a/src/main/java/g0101_0200/s0118_pascals_triangle/pascaltriangleanimated2.gif b/src/main/java/g0101_0200/s0118_pascals_triangle/pascaltriangleanimated2.gif new file mode 100644 index 000000000..d05298a55 Binary files /dev/null and b/src/main/java/g0101_0200/s0118_pascals_triangle/pascaltriangleanimated2.gif differ diff --git a/src/main/java/g0101_0200/s0118_pascals_triangle/readme.md b/src/main/java/g0101_0200/s0118_pascals_triangle/readme.md index 48f634fe0..0941008bd 100644 --- a/src/main/java/g0101_0200/s0118_pascals_triangle/readme.md +++ b/src/main/java/g0101_0200/s0118_pascals_triangle/readme.md @@ -6,7 +6,7 @@ Given an integer `numRows`, return the first numRows of **Pascal's triangle**. In **Pascal's triangle**, each number is the sum of the two numbers directly above it as shown: -![](https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif) +![](pascaltriangleanimated2.gif) **Example 1:** diff --git a/src/main/java/g0101_0200/s0119_pascals_triangle_ii/pascaltriangleanimated2.gif b/src/main/java/g0101_0200/s0119_pascals_triangle_ii/pascaltriangleanimated2.gif new file mode 100644 index 000000000..d05298a55 Binary files /dev/null and b/src/main/java/g0101_0200/s0119_pascals_triangle_ii/pascaltriangleanimated2.gif differ diff --git a/src/main/java/g0101_0200/s0119_pascals_triangle_ii/readme.md b/src/main/java/g0101_0200/s0119_pascals_triangle_ii/readme.md index 8b074d7c9..b295c03d2 100644 --- a/src/main/java/g0101_0200/s0119_pascals_triangle_ii/readme.md +++ b/src/main/java/g0101_0200/s0119_pascals_triangle_ii/readme.md @@ -6,7 +6,7 @@ Given an integer `rowIndex`, return the `rowIndexth` (**0-indexed**) row of the In **Pascal's triangle**, each number is the sum of the two numbers directly above it as shown: -![](https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif) +![](pascaltriangleanimated2.gif) **Example 1:** diff --git a/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/exx1.jpg b/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/exx1.jpg new file mode 100644 index 000000000..38574c4e9 Binary files /dev/null and b/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/exx1.jpg differ diff --git a/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/exx2.jpg b/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/exx2.jpg new file mode 100644 index 000000000..f3859725f Binary files /dev/null and b/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/exx2.jpg differ diff --git a/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/readme.md b/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/readme.md index 15f9fe527..9fd92845a 100644 --- a/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/readme.md +++ b/src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum/readme.md @@ -10,7 +10,7 @@ Given the `root` of a binary tree, return _the maximum **path sum** of any **non **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/13/exx1.jpg) +![](exx1.jpg) **Input:** root = [1,2,3] @@ -20,7 +20,7 @@ Given the `root` of a binary tree, return _the maximum **path sum** of any **non **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/13/exx2.jpg) +![](exx2.jpg) **Input:** root = [-10,9,20,null,null,15,7] diff --git a/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/num1tree.jpg b/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/num1tree.jpg new file mode 100644 index 000000000..f4dd2e009 Binary files /dev/null and b/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/num1tree.jpg differ diff --git a/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/num2tree.jpg b/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/num2tree.jpg new file mode 100644 index 000000000..a35197617 Binary files /dev/null and b/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/num2tree.jpg differ diff --git a/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/readme.md b/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/readme.md index 66a34019a..af20db406 100644 --- a/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/readme.md +++ b/src/main/java/g0101_0200/s0129_sum_root_to_leaf_numbers/readme.md @@ -14,7 +14,7 @@ A **leaf** node is a node with no children. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/num1tree.jpg) +![](num1tree.jpg) **Input:** root = [1,2,3] @@ -24,7 +24,7 @@ A **leaf** node is a node with no children. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/19/num2tree.jpg) +![](num2tree.jpg) **Input:** root = [4,9,0,5,1] diff --git a/src/main/java/g0101_0200/s0130_surrounded_regions/readme.md b/src/main/java/g0101_0200/s0130_surrounded_regions/readme.md index 6b12aaacd..2ae6d7b09 100644 --- a/src/main/java/g0101_0200/s0130_surrounded_regions/readme.md +++ b/src/main/java/g0101_0200/s0130_surrounded_regions/readme.md @@ -8,7 +8,7 @@ A region is **captured** by flipping all `'O'`s into `'X'`s in that surrounded r **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/xogrid.jpg) +![](xogrid.jpg) **Input:** board = [["X","X","X","X"],["X","O","O","X"],["X","X","O","X"],["X","O","X","X"]] diff --git a/src/main/java/g0101_0200/s0130_surrounded_regions/xogrid.jpg b/src/main/java/g0101_0200/s0130_surrounded_regions/xogrid.jpg new file mode 100644 index 000000000..aba1a86bf Binary files /dev/null and b/src/main/java/g0101_0200/s0130_surrounded_regions/xogrid.jpg differ diff --git a/src/main/java/g0101_0200/s0133_clone_graph/133_clone_graph_question.png b/src/main/java/g0101_0200/s0133_clone_graph/133_clone_graph_question.png new file mode 100644 index 000000000..b8ddb4a53 Binary files /dev/null and b/src/main/java/g0101_0200/s0133_clone_graph/133_clone_graph_question.png differ diff --git a/src/main/java/g0101_0200/s0133_clone_graph/graph-1.png b/src/main/java/g0101_0200/s0133_clone_graph/graph-1.png new file mode 100644 index 000000000..c87f1a91c Binary files /dev/null and b/src/main/java/g0101_0200/s0133_clone_graph/graph-1.png differ diff --git a/src/main/java/g0101_0200/s0133_clone_graph/graph.png b/src/main/java/g0101_0200/s0133_clone_graph/graph.png new file mode 100644 index 000000000..1c9507188 Binary files /dev/null and b/src/main/java/g0101_0200/s0133_clone_graph/graph.png differ diff --git a/src/main/java/g0101_0200/s0133_clone_graph/readme.md b/src/main/java/g0101_0200/s0133_clone_graph/readme.md index 97ec33204..63178f4c4 100644 --- a/src/main/java/g0101_0200/s0133_clone_graph/readme.md +++ b/src/main/java/g0101_0200/s0133_clone_graph/readme.md @@ -20,7 +20,7 @@ The given node will always be the first node with `val = 1`. You must return the **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/04/133_clone_graph_question.png) +![](133_clone_graph_question.png) **Input:** adjList = [[2,4],[1,3],[2,4],[1,3]] @@ -36,7 +36,7 @@ The given node will always be the first node with `val = 1`. You must return the **Example 2:** -![](https://assets.leetcode.com/uploads/2020/01/07/graph.png) +![](graph.png) **Input:** adjList = [[]] @@ -54,7 +54,7 @@ The given node will always be the first node with `val = 1`. You must return the **Example 4:** -![](https://assets.leetcode.com/uploads/2020/01/07/graph-1.png) +![](graph-1.png) **Input:** adjList = [[2],[1]] diff --git a/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e1.png b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e1.png new file mode 100644 index 000000000..7afabbbdc Binary files /dev/null and b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e1.png differ diff --git a/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e2.png b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e2.png new file mode 100644 index 000000000..b0d1edfbc Binary files /dev/null and b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e2.png differ diff --git a/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e3.png b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e3.png new file mode 100644 index 000000000..14d6dd4e2 Binary files /dev/null and b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/e3.png differ diff --git a/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/readme.md b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/readme.md index 4a2316baa..a88a93023 100644 --- a/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/readme.md +++ b/src/main/java/g0101_0200/s0138_copy_list_with_random_pointer/readme.md @@ -19,7 +19,7 @@ Your code will **only** be given the `head` of the original linked list. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/12/18/e1.png) +![](e1.png) **Input:** head = [[7,null],[13,0],[11,4],[10,2],[1,0]] @@ -27,7 +27,7 @@ Your code will **only** be given the `head` of the original linked list. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/12/18/e2.png) +![](e2.png) **Input:** head = [[1,1],[2,1]] @@ -35,7 +35,7 @@ Your code will **only** be given the `head` of the original linked list. **Example 3:** -**![](https://assets.leetcode.com/uploads/2019/12/18/e3.png)** +**![](e3.png)** **Input:** head = [[3,null],[3,0],[3,null]] diff --git a/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist.png b/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist.png new file mode 100644 index 000000000..b0111ae63 Binary files /dev/null and b/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist.png differ diff --git a/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist_test2.png b/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist_test2.png new file mode 100644 index 000000000..634e7a47f Binary files /dev/null and b/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist_test2.png differ diff --git a/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist_test3.png b/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist_test3.png new file mode 100644 index 000000000..9f11a9e45 Binary files /dev/null and b/src/main/java/g0101_0200/s0141_linked_list_cycle/circularlinkedlist_test3.png differ diff --git a/src/main/java/g0101_0200/s0141_linked_list_cycle/readme.md b/src/main/java/g0101_0200/s0141_linked_list_cycle/readme.md index da791d6a6..34092e614 100644 --- a/src/main/java/g0101_0200/s0141_linked_list_cycle/readme.md +++ b/src/main/java/g0101_0200/s0141_linked_list_cycle/readme.md @@ -10,7 +10,7 @@ Return `true` _if there is a cycle in the linked list_. Otherwise, return `false **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist.png) +![](circularlinkedlist.png) **Input:** head = [3,2,0,-4], pos = 1 @@ -20,7 +20,7 @@ Return `true` _if there is a cycle in the linked list_. Otherwise, return `false **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test2.png) +![](circularlinkedlist_test2.png) **Input:** head = [1,2], pos = 0 @@ -30,7 +30,7 @@ Return `true` _if there is a cycle in the linked list_. Otherwise, return `false **Example 3:** -![](https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test3.png) +![](circularlinkedlist_test3.png) **Input:** head = [1], pos = -1 diff --git a/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist.png b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist.png new file mode 100644 index 000000000..b0111ae63 Binary files /dev/null and b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist.png differ diff --git a/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist_test2.png b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist_test2.png new file mode 100644 index 000000000..634e7a47f Binary files /dev/null and b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist_test2.png differ diff --git a/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist_test3.png b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist_test3.png new file mode 100644 index 000000000..9f11a9e45 Binary files /dev/null and b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/circularlinkedlist_test3.png differ diff --git a/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/readme.md b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/readme.md index 8aeb2e47b..2aa38f514 100644 --- a/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/readme.md +++ b/src/main/java/g0101_0200/s0142_linked_list_cycle_ii/readme.md @@ -10,7 +10,7 @@ There is a cycle in a linked list if there is some node in the list that can be **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist.png) +![](circularlinkedlist.png) **Input:** head = [3,2,0,-4], pos = 1 @@ -20,7 +20,7 @@ There is a cycle in a linked list if there is some node in the list that can be **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test2.png) +![](circularlinkedlist_test2.png) **Input:** head = [1,2], pos = 0 @@ -30,7 +30,7 @@ There is a cycle in a linked list if there is some node in the list that can be **Example 3:** -![](https://assets.leetcode.com/uploads/2018/12/07/circularlinkedlist_test3.png) +![](circularlinkedlist_test3.png) **Input:** head = [1], pos = -1 diff --git a/src/main/java/g0101_0200/s0143_reorder_list/readme.md b/src/main/java/g0101_0200/s0143_reorder_list/readme.md index b02bacde1..1504edd33 100644 --- a/src/main/java/g0101_0200/s0143_reorder_list/readme.md +++ b/src/main/java/g0101_0200/s0143_reorder_list/readme.md @@ -14,7 +14,7 @@ You may not modify the values in the list's nodes. Only nodes themselves may be **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/04/reorder1linked-list.jpg) +![](reorder1linked-list.jpg) **Input:** head = [1,2,3,4] @@ -22,7 +22,7 @@ You may not modify the values in the list's nodes. Only nodes themselves may be **Example 2:** -![](https://assets.leetcode.com/uploads/2021/03/09/reorder2-linked-list.jpg) +![](reorder2-linked-list.jpg) **Input:** head = [1,2,3,4,5] diff --git a/src/main/java/g0101_0200/s0143_reorder_list/reorder1linked-list.jpg b/src/main/java/g0101_0200/s0143_reorder_list/reorder1linked-list.jpg new file mode 100644 index 000000000..c99410a86 Binary files /dev/null and b/src/main/java/g0101_0200/s0143_reorder_list/reorder1linked-list.jpg differ diff --git a/src/main/java/g0101_0200/s0143_reorder_list/reorder2-linked-list.jpg b/src/main/java/g0101_0200/s0143_reorder_list/reorder2-linked-list.jpg new file mode 100644 index 000000000..fc03e2e2a Binary files /dev/null and b/src/main/java/g0101_0200/s0143_reorder_list/reorder2-linked-list.jpg differ diff --git a/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_1.jpg b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_1.jpg new file mode 100644 index 000000000..032c3ee64 Binary files /dev/null and b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_1.jpg differ diff --git a/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_4.jpg b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_4.jpg new file mode 100644 index 000000000..e80c83597 Binary files /dev/null and b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_4.jpg differ diff --git a/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_5.jpg b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_5.jpg new file mode 100644 index 000000000..d824cb48a Binary files /dev/null and b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/inorder_5.jpg differ diff --git a/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/readme.md b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/readme.md index 3e289921c..22b28e7ce 100644 --- a/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/readme.md +++ b/src/main/java/g0101_0200/s0144_binary_tree_preorder_traversal/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the preorder traversal of its nodes' **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/15/inorder_1.jpg) +![](inorder_1.jpg) **Input:** root = [1,null,2,3] @@ -26,7 +26,7 @@ Given the `root` of a binary tree, return _the preorder traversal of its nodes' **Example 4:** -![](https://assets.leetcode.com/uploads/2020/09/15/inorder_5.jpg) +![](inorder_5.jpg) **Input:** root = [1,2] @@ -34,7 +34,7 @@ Given the `root` of a binary tree, return _the preorder traversal of its nodes' **Example 5:** -![](https://assets.leetcode.com/uploads/2020/09/15/inorder_4.jpg) +![](inorder_4.jpg) **Input:** root = [1,null,2] diff --git a/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre1.jpg b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre1.jpg new file mode 100644 index 000000000..a48a7fc0f Binary files /dev/null and b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre1.jpg differ diff --git a/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre2.jpg b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre2.jpg new file mode 100644 index 000000000..c62138088 Binary files /dev/null and b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre2.jpg differ diff --git a/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre3.jpg b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre3.jpg new file mode 100644 index 000000000..d3aba1f95 Binary files /dev/null and b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/pre3.jpg differ diff --git a/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/readme.md b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/readme.md index b41490ea4..be946928b 100644 --- a/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/readme.md +++ b/src/main/java/g0101_0200/s0145_binary_tree_postorder_traversal/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the postorder traversal of its nodes' **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/28/pre1.jpg) +![](pre1.jpg) **Input:** root = [1,null,2,3] @@ -26,7 +26,7 @@ Given the `root` of a binary tree, return _the postorder traversal of its nodes' **Example 4:** -![](https://assets.leetcode.com/uploads/2020/08/28/pre3.jpg) +![](pre3.jpg) **Input:** root = [1,2] @@ -34,7 +34,7 @@ Given the `root` of a binary tree, return _the postorder traversal of its nodes' **Example 5:** -![](https://assets.leetcode.com/uploads/2020/08/28/pre2.jpg) +![](pre2.jpg) **Input:** root = [1,null,2] diff --git a/src/main/java/g0101_0200/s0147_insertion_sort_list/insertion-sort-example-300px.gif b/src/main/java/g0101_0200/s0147_insertion_sort_list/insertion-sort-example-300px.gif new file mode 100644 index 000000000..96c1b12d5 Binary files /dev/null and b/src/main/java/g0101_0200/s0147_insertion_sort_list/insertion-sort-example-300px.gif differ diff --git a/src/main/java/g0101_0200/s0147_insertion_sort_list/readme.md b/src/main/java/g0101_0200/s0147_insertion_sort_list/readme.md index b533808b7..2ec73c2e9 100644 --- a/src/main/java/g0101_0200/s0147_insertion_sort_list/readme.md +++ b/src/main/java/g0101_0200/s0147_insertion_sort_list/readme.md @@ -12,11 +12,11 @@ The steps of the **insertion sort** algorithm: The following is a graphical example of the insertion sort algorithm. The partially sorted list (black) initially contains only the first element in the list. One element (red) is removed from the input data and inserted in-place into the sorted list with each iteration. -![](https://upload.wikimedia.org/wikipedia/commons/0/0f/Insertion-sort-example-300px.gif) +![](insertion-sort-example-300px.gif) **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/04/sort1linked-list.jpg) +![](sort1linked-list.jpg) **Input:** head = [4,2,1,3] @@ -24,7 +24,7 @@ The following is a graphical example of the insertion sort algorithm. The partia **Example 2:** -![](https://assets.leetcode.com/uploads/2021/03/04/sort2linked-list.jpg) +![](sort2linked-list.jpg) **Input:** head = [-1,5,3,4,0] diff --git a/src/main/java/g0101_0200/s0147_insertion_sort_list/sort1linked-list.jpg b/src/main/java/g0101_0200/s0147_insertion_sort_list/sort1linked-list.jpg new file mode 100644 index 000000000..dca8b1260 Binary files /dev/null and b/src/main/java/g0101_0200/s0147_insertion_sort_list/sort1linked-list.jpg differ diff --git a/src/main/java/g0101_0200/s0147_insertion_sort_list/sort2linked-list.jpg b/src/main/java/g0101_0200/s0147_insertion_sort_list/sort2linked-list.jpg new file mode 100644 index 000000000..b1815456d Binary files /dev/null and b/src/main/java/g0101_0200/s0147_insertion_sort_list/sort2linked-list.jpg differ diff --git a/src/main/java/g0101_0200/s0148_sort_list/readme.md b/src/main/java/g0101_0200/s0148_sort_list/readme.md index 94f637d8e..bda8262a4 100644 --- a/src/main/java/g0101_0200/s0148_sort_list/readme.md +++ b/src/main/java/g0101_0200/s0148_sort_list/readme.md @@ -6,7 +6,7 @@ Given the `head` of a linked list, return _the list after sorting it in **ascend **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/14/sort_list_1.jpg) +![](sort_list_1.jpg) **Input:** head = [4,2,1,3] @@ -14,7 +14,7 @@ Given the `head` of a linked list, return _the list after sorting it in **ascend **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/14/sort_list_2.jpg) +![](sort_list_2.jpg) **Input:** head = [-1,5,3,4,0] diff --git a/src/main/java/g0101_0200/s0148_sort_list/sort_list_1.jpg b/src/main/java/g0101_0200/s0148_sort_list/sort_list_1.jpg new file mode 100644 index 000000000..ddc64b57a Binary files /dev/null and b/src/main/java/g0101_0200/s0148_sort_list/sort_list_1.jpg differ diff --git a/src/main/java/g0101_0200/s0148_sort_list/sort_list_2.jpg b/src/main/java/g0101_0200/s0148_sort_list/sort_list_2.jpg new file mode 100644 index 000000000..215a2c1ab Binary files /dev/null and b/src/main/java/g0101_0200/s0148_sort_list/sort_list_2.jpg differ diff --git a/src/main/java/g0101_0200/s0149_max_points_on_a_line/plane1.jpg b/src/main/java/g0101_0200/s0149_max_points_on_a_line/plane1.jpg new file mode 100644 index 000000000..6c598f8f2 Binary files /dev/null and b/src/main/java/g0101_0200/s0149_max_points_on_a_line/plane1.jpg differ diff --git a/src/main/java/g0101_0200/s0149_max_points_on_a_line/plane2.jpg b/src/main/java/g0101_0200/s0149_max_points_on_a_line/plane2.jpg new file mode 100644 index 000000000..fc455cb2a Binary files /dev/null and b/src/main/java/g0101_0200/s0149_max_points_on_a_line/plane2.jpg differ diff --git a/src/main/java/g0101_0200/s0149_max_points_on_a_line/readme.md b/src/main/java/g0101_0200/s0149_max_points_on_a_line/readme.md index 5e2333008..2685558f0 100644 --- a/src/main/java/g0101_0200/s0149_max_points_on_a_line/readme.md +++ b/src/main/java/g0101_0200/s0149_max_points_on_a_line/readme.md @@ -6,7 +6,7 @@ Given an array of `points` where points[i] = [xi, yi **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/25/plane1.jpg) +![](plane1.jpg) **Input:** points = [[1,1],[2,2],[3,3]] @@ -14,7 +14,7 @@ Given an array of `points` where points[i] = [xi, yi **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/25/plane2.jpg) +![](plane2.jpg) **Input:** points = [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]] diff --git a/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_1_1.png b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_1_1.png new file mode 100644 index 000000000..e3bc86851 Binary files /dev/null and b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_1_1.png differ diff --git a/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_2.png b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_2.png new file mode 100644 index 000000000..947d98977 Binary files /dev/null and b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_2.png differ diff --git a/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_3.png b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_3.png new file mode 100644 index 000000000..eea063119 Binary files /dev/null and b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_example_3.png differ diff --git a/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_statement.png b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_statement.png new file mode 100644 index 000000000..55870e302 Binary files /dev/null and b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/160_statement.png differ diff --git a/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/readme.md b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/readme.md index de0e1d801..82230896d 100644 --- a/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/readme.md +++ b/src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists/readme.md @@ -6,7 +6,7 @@ Given the heads of two singly linked-lists `headA` and `headB`, return _the node For example, the following two linked lists begin to intersect at node `c1`: -![](https://assets.leetcode.com/uploads/2021/03/05/160_statement.png) +![](160_statement.png) The test cases are generated such that there are no cycles anywhere in the entire linked structure. @@ -26,7 +26,7 @@ The judge will then create the linked structure based on these inputs and pass t **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/05/160_example_1_1.png) +![](160_example_1_1.png) **Input:** intersectVal = 8, listA = [4,1,8,4,5], listB = [5,6,1,8,4,5], skipA = 2, skipB = 3 @@ -36,7 +36,7 @@ The judge will then create the linked structure based on these inputs and pass t **Example 2:** -![](https://assets.leetcode.com/uploads/2021/03/05/160_example_2.png) +![](160_example_2.png) **Input:** intersectVal = 2, listA = [1,9,1,2,4], listB = [3,2,4], skipA = 3, skipB = 1 @@ -46,7 +46,7 @@ The judge will then create the linked structure based on these inputs and pass t **Example 3:** -![](https://assets.leetcode.com/uploads/2021/03/05/160_example_3.png) +![](160_example_3.png) **Input:** intersectVal = 0, listA = [2,6,4], listB = [1,5], skipA = 3, skipB = 2 diff --git a/src/main/java/g0101_0200/s0173_binary_search_tree_iterator/bst-tree.png b/src/main/java/g0101_0200/s0173_binary_search_tree_iterator/bst-tree.png new file mode 100644 index 000000000..f160de8e3 Binary files /dev/null and b/src/main/java/g0101_0200/s0173_binary_search_tree_iterator/bst-tree.png differ diff --git a/src/main/java/g0101_0200/s0173_binary_search_tree_iterator/readme.md b/src/main/java/g0101_0200/s0173_binary_search_tree_iterator/readme.md index 458a01599..83eac1fb8 100644 --- a/src/main/java/g0101_0200/s0173_binary_search_tree_iterator/readme.md +++ b/src/main/java/g0101_0200/s0173_binary_search_tree_iterator/readme.md @@ -14,7 +14,7 @@ You may assume that `next()` calls will always be valid. That is, there will be **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/25/bst-tree.png) +![](bst-tree.png) **Input** ["BSTIterator", "next", "next", "hasNext", "next", "hasNext", "next", "hasNext", "next", "hasNext"] [[[7, 3, 15, null, null, 9, 20]], [], [], [], [], [], [], [], [], []] diff --git a/src/main/java/g0101_0200/s0174_dungeon_game/dungeon-grid-1.jpg b/src/main/java/g0101_0200/s0174_dungeon_game/dungeon-grid-1.jpg new file mode 100644 index 000000000..e34de014d Binary files /dev/null and b/src/main/java/g0101_0200/s0174_dungeon_game/dungeon-grid-1.jpg differ diff --git a/src/main/java/g0101_0200/s0174_dungeon_game/readme.md b/src/main/java/g0101_0200/s0174_dungeon_game/readme.md index 502030fb4..726f066ed 100644 --- a/src/main/java/g0101_0200/s0174_dungeon_game/readme.md +++ b/src/main/java/g0101_0200/s0174_dungeon_game/readme.md @@ -16,7 +16,7 @@ Return _the knight's minimum initial health so that he can rescue the princess_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/13/dungeon-grid-1.jpg) +![](dungeon-grid-1.jpg) **Input:** dungeon = [[-2,-3,3],[-5,-10,1],[10,30,-5]] diff --git a/src/main/java/g0101_0200/s0199_binary_tree_right_side_view/readme.md b/src/main/java/g0101_0200/s0199_binary_tree_right_side_view/readme.md index cce1fc176..bb0505386 100644 --- a/src/main/java/g0101_0200/s0199_binary_tree_right_side_view/readme.md +++ b/src/main/java/g0101_0200/s0199_binary_tree_right_side_view/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, imagine yourself standing on the **right side **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/14/tree.jpg) +![](tree.jpg) **Input:** root = [1,2,3,null,5,null,4] diff --git a/src/main/java/g0101_0200/s0199_binary_tree_right_side_view/tree.jpg b/src/main/java/g0101_0200/s0199_binary_tree_right_side_view/tree.jpg new file mode 100644 index 000000000..d1b971881 Binary files /dev/null and b/src/main/java/g0101_0200/s0199_binary_tree_right_side_view/tree.jpg differ diff --git a/src/main/java/g0201_0300/s0203_remove_linked_list_elements/readme.md b/src/main/java/g0201_0300/s0203_remove_linked_list_elements/readme.md index 5207154f4..48362c17b 100644 --- a/src/main/java/g0201_0300/s0203_remove_linked_list_elements/readme.md +++ b/src/main/java/g0201_0300/s0203_remove_linked_list_elements/readme.md @@ -6,7 +6,7 @@ Given the `head` of a linked list and an integer `val`, remove all the nodes of **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/06/removelinked-list.jpg) +![](removelinked-list.jpg) **Input:** head = [1,2,6,3,4,5,6], val = 6 diff --git a/src/main/java/g0201_0300/s0203_remove_linked_list_elements/removelinked-list.jpg b/src/main/java/g0201_0300/s0203_remove_linked_list_elements/removelinked-list.jpg new file mode 100644 index 000000000..5f5f84dcc Binary files /dev/null and b/src/main/java/g0201_0300/s0203_remove_linked_list_elements/removelinked-list.jpg differ diff --git a/src/main/java/g0201_0300/s0206_reverse_linked_list/readme.md b/src/main/java/g0201_0300/s0206_reverse_linked_list/readme.md index a764d550c..517daaede 100644 --- a/src/main/java/g0201_0300/s0206_reverse_linked_list/readme.md +++ b/src/main/java/g0201_0300/s0206_reverse_linked_list/readme.md @@ -6,7 +6,7 @@ Given the `head` of a singly linked list, reverse the list, and return _the reve **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/19/rev1ex1.jpg) +![](rev1ex1.jpg) **Input:** head = [1,2,3,4,5] @@ -14,7 +14,7 @@ Given the `head` of a singly linked list, reverse the list, and return _the reve **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/19/rev1ex2.jpg) +![](rev1ex2.jpg) **Input:** head = [1,2] diff --git a/src/main/java/g0201_0300/s0206_reverse_linked_list/rev1ex1.jpg b/src/main/java/g0201_0300/s0206_reverse_linked_list/rev1ex1.jpg new file mode 100644 index 000000000..697bf935d Binary files /dev/null and b/src/main/java/g0201_0300/s0206_reverse_linked_list/rev1ex1.jpg differ diff --git a/src/main/java/g0201_0300/s0206_reverse_linked_list/rev1ex2.jpg b/src/main/java/g0201_0300/s0206_reverse_linked_list/rev1ex2.jpg new file mode 100644 index 000000000..a50261a97 Binary files /dev/null and b/src/main/java/g0201_0300/s0206_reverse_linked_list/rev1ex2.jpg differ diff --git a/src/main/java/g0201_0300/s0212_word_search_ii/readme.md b/src/main/java/g0201_0300/s0212_word_search_ii/readme.md index 8a2c49340..bbf4bffb5 100644 --- a/src/main/java/g0201_0300/s0212_word_search_ii/readme.md +++ b/src/main/java/g0201_0300/s0212_word_search_ii/readme.md @@ -8,7 +8,7 @@ Each word must be constructed from letters of sequentially adjacent cells, where **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/07/search1.jpg) +![](search1.jpg) **Input:** board = [["o","a","a","n"],["e","t","a","e"],["i","h","k","r"],["i","f","l","v"]], words = ["oath","pea","eat","rain"] @@ -16,7 +16,7 @@ Each word must be constructed from letters of sequentially adjacent cells, where **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/07/search2.jpg) +![](search2.jpg) **Input:** board = [["a","b"],["c","d"]], words = ["abcb"] diff --git a/src/main/java/g0201_0300/s0212_word_search_ii/search1.jpg b/src/main/java/g0201_0300/s0212_word_search_ii/search1.jpg new file mode 100644 index 000000000..9f569294f Binary files /dev/null and b/src/main/java/g0201_0300/s0212_word_search_ii/search1.jpg differ diff --git a/src/main/java/g0201_0300/s0212_word_search_ii/search2.jpg b/src/main/java/g0201_0300/s0212_word_search_ii/search2.jpg new file mode 100644 index 000000000..7faa406ff Binary files /dev/null and b/src/main/java/g0201_0300/s0212_word_search_ii/search2.jpg differ diff --git a/src/main/java/g0201_0300/s0218_the_skyline_problem/merged.jpg b/src/main/java/g0201_0300/s0218_the_skyline_problem/merged.jpg new file mode 100644 index 000000000..75c5d63d8 Binary files /dev/null and b/src/main/java/g0201_0300/s0218_the_skyline_problem/merged.jpg differ diff --git a/src/main/java/g0201_0300/s0218_the_skyline_problem/readme.md b/src/main/java/g0201_0300/s0218_the_skyline_problem/readme.md index 5eeff6057..4dbc26ea8 100644 --- a/src/main/java/g0201_0300/s0218_the_skyline_problem/readme.md +++ b/src/main/java/g0201_0300/s0218_the_skyline_problem/readme.md @@ -18,7 +18,7 @@ The **skyline** should be represented as a list of "key points" **sorted by thei **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/01/merged.jpg) +![](merged.jpg) **Input:** buildings = [[2,9,10],[3,7,15],[5,12,12],[15,20,10],[19,24,8]] diff --git a/src/main/java/g0201_0300/s0221_maximal_square/max1grid.jpg b/src/main/java/g0201_0300/s0221_maximal_square/max1grid.jpg new file mode 100644 index 000000000..0517c5d9c Binary files /dev/null and b/src/main/java/g0201_0300/s0221_maximal_square/max1grid.jpg differ diff --git a/src/main/java/g0201_0300/s0221_maximal_square/max2grid.jpg b/src/main/java/g0201_0300/s0221_maximal_square/max2grid.jpg new file mode 100644 index 000000000..e276e2bff Binary files /dev/null and b/src/main/java/g0201_0300/s0221_maximal_square/max2grid.jpg differ diff --git a/src/main/java/g0201_0300/s0221_maximal_square/readme.md b/src/main/java/g0201_0300/s0221_maximal_square/readme.md index d9d3909d9..67087bee2 100644 --- a/src/main/java/g0201_0300/s0221_maximal_square/readme.md +++ b/src/main/java/g0201_0300/s0221_maximal_square/readme.md @@ -6,7 +6,7 @@ Given an `m x n` binary `matrix` filled with `0`'s and `1`'s, _find the largest **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/26/max1grid.jpg) +![](max1grid.jpg) **Input:** matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]] @@ -14,7 +14,7 @@ Given an `m x n` binary `matrix` filled with `0`'s and `1`'s, _find the largest **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/26/max2grid.jpg) +![](max2grid.jpg) **Input:** matrix = [["0","1"],["1","0"]] diff --git a/src/main/java/g0201_0300/s0222_count_complete_tree_nodes/complete.jpg b/src/main/java/g0201_0300/s0222_count_complete_tree_nodes/complete.jpg new file mode 100644 index 000000000..d1d8c204e Binary files /dev/null and b/src/main/java/g0201_0300/s0222_count_complete_tree_nodes/complete.jpg differ diff --git a/src/main/java/g0201_0300/s0222_count_complete_tree_nodes/readme.md b/src/main/java/g0201_0300/s0222_count_complete_tree_nodes/readme.md index 60b870acc..57dcd996c 100644 --- a/src/main/java/g0201_0300/s0222_count_complete_tree_nodes/readme.md +++ b/src/main/java/g0201_0300/s0222_count_complete_tree_nodes/readme.md @@ -10,7 +10,7 @@ Design an algorithm that runs in less than `O(n)` time complexity. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/14/complete.jpg) +![](complete.jpg) **Input:** root = [1,2,3,4,5,6] diff --git a/src/main/java/g0201_0300/s0223_rectangle_area/readme.md b/src/main/java/g0201_0300/s0223_rectangle_area/readme.md index e7d26fed3..a7815f436 100644 --- a/src/main/java/g0201_0300/s0223_rectangle_area/readme.md +++ b/src/main/java/g0201_0300/s0223_rectangle_area/readme.md @@ -10,7 +10,7 @@ The second rectangle is defined by its **bottom-left** corner `(bx1, by1)` and i **Example 1:** -![Rectangle Area](https://assets.leetcode.com/uploads/2021/05/08/rectangle-plane.png) +![Rectangle Area](rectangle-plane.png) **Input:** ax1 = -3, ay1 = 0, ax2 = 3, ay2 = 4, bx1 = 0, by1 = -1, bx2 = 9, by2 = 2 diff --git a/src/main/java/g0201_0300/s0223_rectangle_area/rectangle-plane.png b/src/main/java/g0201_0300/s0223_rectangle_area/rectangle-plane.png new file mode 100644 index 000000000..9b9a5d0d2 Binary files /dev/null and b/src/main/java/g0201_0300/s0223_rectangle_area/rectangle-plane.png differ diff --git a/src/main/java/g0201_0300/s0226_invert_binary_tree/invert1-tree.jpg b/src/main/java/g0201_0300/s0226_invert_binary_tree/invert1-tree.jpg new file mode 100644 index 000000000..d82d93a20 Binary files /dev/null and b/src/main/java/g0201_0300/s0226_invert_binary_tree/invert1-tree.jpg differ diff --git a/src/main/java/g0201_0300/s0226_invert_binary_tree/invert2-tree.jpg b/src/main/java/g0201_0300/s0226_invert_binary_tree/invert2-tree.jpg new file mode 100644 index 000000000..6d4744b5c Binary files /dev/null and b/src/main/java/g0201_0300/s0226_invert_binary_tree/invert2-tree.jpg differ diff --git a/src/main/java/g0201_0300/s0226_invert_binary_tree/readme.md b/src/main/java/g0201_0300/s0226_invert_binary_tree/readme.md index 339bf4eab..e0728afd8 100644 --- a/src/main/java/g0201_0300/s0226_invert_binary_tree/readme.md +++ b/src/main/java/g0201_0300/s0226_invert_binary_tree/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, invert the tree, and return _its root_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/14/invert1-tree.jpg) +![](invert1-tree.jpg) **Input:** root = [4,2,7,1,3,6,9] @@ -14,7 +14,7 @@ Given the `root` of a binary tree, invert the tree, and return _its root_. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/03/14/invert2-tree.jpg) +![](invert2-tree.jpg) **Input:** root = [2,1,3] diff --git a/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/kthtree1.jpg b/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/kthtree1.jpg new file mode 100644 index 000000000..4eb2f16b5 Binary files /dev/null and b/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/kthtree1.jpg differ diff --git a/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/kthtree2.jpg b/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/kthtree2.jpg new file mode 100644 index 000000000..d36c3f8a4 Binary files /dev/null and b/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/kthtree2.jpg differ diff --git a/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/readme.md b/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/readme.md index 840d75815..5af41f3b1 100644 --- a/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/readme.md +++ b/src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary search tree, and an integer `k`, return _the_ result[i] = [r **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/08/waterflow-grid.jpg) +![](waterflow-grid.jpg) **Input:** heights = [[1,2,2,3,5],[3,2,3,4,4],[2,4,5,3,1],[6,7,1,4,5],[5,1,1,2,4]] diff --git a/src/main/java/g0401_0500/s0417_pacific_atlantic_water_flow/waterflow-grid.jpg b/src/main/java/g0401_0500/s0417_pacific_atlantic_water_flow/waterflow-grid.jpg new file mode 100644 index 000000000..825101273 Binary files /dev/null and b/src/main/java/g0401_0500/s0417_pacific_atlantic_water_flow/waterflow-grid.jpg differ diff --git a/src/main/java/g0401_0500/s0419_battleships_in_a_board/battelship-grid.jpg b/src/main/java/g0401_0500/s0419_battleships_in_a_board/battelship-grid.jpg new file mode 100644 index 000000000..9663daf96 Binary files /dev/null and b/src/main/java/g0401_0500/s0419_battleships_in_a_board/battelship-grid.jpg differ diff --git a/src/main/java/g0401_0500/s0419_battleships_in_a_board/readme.md b/src/main/java/g0401_0500/s0419_battleships_in_a_board/readme.md index 40d7b7628..bb0af34d4 100644 --- a/src/main/java/g0401_0500/s0419_battleships_in_a_board/readme.md +++ b/src/main/java/g0401_0500/s0419_battleships_in_a_board/readme.md @@ -8,7 +8,7 @@ Given an `m x n` matrix `board` where each cell is a battleship `'X'` or empty ` **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/10/battelship-grid.jpg) +![](battelship-grid.jpg) **Input:** board = [["X",".",".","X"],[".",".",".","X"],[".",".",".","X"]] diff --git a/src/main/java/g0401_0500/s0427_construct_quad_tree/e1tree.png b/src/main/java/g0401_0500/s0427_construct_quad_tree/e1tree.png new file mode 100644 index 000000000..e31919ad5 Binary files /dev/null and b/src/main/java/g0401_0500/s0427_construct_quad_tree/e1tree.png differ diff --git a/src/main/java/g0401_0500/s0427_construct_quad_tree/e2mat.png b/src/main/java/g0401_0500/s0427_construct_quad_tree/e2mat.png new file mode 100644 index 000000000..fb80e3c0c Binary files /dev/null and b/src/main/java/g0401_0500/s0427_construct_quad_tree/e2mat.png differ diff --git a/src/main/java/g0401_0500/s0427_construct_quad_tree/e2tree.png b/src/main/java/g0401_0500/s0427_construct_quad_tree/e2tree.png new file mode 100644 index 000000000..169c50a61 Binary files /dev/null and b/src/main/java/g0401_0500/s0427_construct_quad_tree/e2tree.png differ diff --git a/src/main/java/g0401_0500/s0427_construct_quad_tree/grid1.png b/src/main/java/g0401_0500/s0427_construct_quad_tree/grid1.png new file mode 100644 index 000000000..ac8082855 Binary files /dev/null and b/src/main/java/g0401_0500/s0427_construct_quad_tree/grid1.png differ diff --git a/src/main/java/g0401_0500/s0427_construct_quad_tree/new_top.png b/src/main/java/g0401_0500/s0427_construct_quad_tree/new_top.png new file mode 100644 index 000000000..f134c4ce1 Binary files /dev/null and b/src/main/java/g0401_0500/s0427_construct_quad_tree/new_top.png differ diff --git a/src/main/java/g0401_0500/s0427_construct_quad_tree/readme.md b/src/main/java/g0401_0500/s0427_construct_quad_tree/readme.md index 9e9dd3d1f..82b36d9c3 100644 --- a/src/main/java/g0401_0500/s0427_construct_quad_tree/readme.md +++ b/src/main/java/g0401_0500/s0427_construct_quad_tree/readme.md @@ -28,7 +28,7 @@ We can construct a Quad-Tree from a two-dimensional area using the following ste 2. If the current grid has different values, set `isLeaf` to False and set `val` to any value and divide the current grid into four sub-grids as shown in the photo. 3. Recurse for each of the children with the proper sub-grid. -![](https://assets.leetcode.com/uploads/2020/02/11/new_top.png) +![](new_top.png) If you want to know more about the Quad-Tree, you can refer to the [wiki](https://en.wikipedia.org/wiki/Quadtree). @@ -42,7 +42,7 @@ If the value of `isLeaf` or `val` is True we represent it as **1** in the list ` **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/11/grid1.png) +![](grid1.png) **Input:** grid = [[0,1],[1,0]] @@ -53,11 +53,11 @@ If the value of `isLeaf` or `val` is True we represent it as **1** in the list ` The explanation of this example is shown below: Notice that 0 represnts False and 1 represents True in the photo representing the Quad-Tree. -![](https://assets.leetcode.com/uploads/2020/02/12/e1tree.png) +![](e1tree.png) **Example 2:** -![](https://assets.leetcode.com/uploads/2020/02/12/e2mat.png) +![](e2mat.png) **Input:** grid = [[1,1,1,1,0,0,0,0],[1,1,1,1,0,0,0,0],[1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1],[1,1,1,1,0,0,0,0],[1,1,1,1,0,0,0,0],[1,1,1,1,0,0,0,0],[1,1,1,1,0,0,0,0]] @@ -70,7 +70,7 @@ If the value of `isLeaf` or `val` is True we represent it as **1** in the list ` The topRight have different values so we divide it into 4 sub-grids where each has the same value. Explanation is shown in the photo below: -![](https://assets.leetcode.com/uploads/2020/02/12/e2tree.png) +![](e2tree.png) **Constraints:** diff --git a/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/narytreeexample.png b/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/narytreeexample.png new file mode 100644 index 000000000..d28c543c8 Binary files /dev/null and b/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/narytreeexample.png differ diff --git a/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/readme.md b/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/readme.md index 2ece65be1..1e2ab110d 100644 --- a/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/readme.md +++ b/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/readme.md @@ -8,7 +8,7 @@ _Nary-Tree input serialization is represented in their level order traversal, ea **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png) +![](narytreeexample.png) **Input:** root = [1,null,3,2,4,null,5,6] @@ -16,7 +16,7 @@ _Nary-Tree input serialization is represented in their level order traversal, ea **Example 2:** -![](https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png) +![](sample_4_964.png) **Input:** root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14] diff --git a/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/sample_4_964.png b/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/sample_4_964.png new file mode 100644 index 000000000..f4347c766 Binary files /dev/null and b/src/main/java/g0401_0500/s0429_n_ary_tree_level_order_traversal/sample_4_964.png differ diff --git a/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten11.jpg b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten11.jpg new file mode 100644 index 000000000..c466134ba Binary files /dev/null and b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten11.jpg differ diff --git a/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten12.jpg b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten12.jpg new file mode 100644 index 000000000..520eee91f Binary files /dev/null and b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten12.jpg differ diff --git a/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten2.1jpg b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten2.1jpg new file mode 100644 index 000000000..4daa4a0a2 Binary files /dev/null and b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/flatten2.1jpg differ diff --git a/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/list.jpg b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/list.jpg new file mode 100644 index 000000000..6ba35158e Binary files /dev/null and b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/list.jpg differ diff --git a/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/readme.md b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/readme.md index 25794212f..08653a819 100644 --- a/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/readme.md +++ b/src/main/java/g0401_0500/s0430_flatten_a_multilevel_doubly_linked_list/readme.md @@ -10,17 +10,17 @@ Return _the_ `head` _of the flattened list. The nodes in the list must have **al **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/09/flatten11.jpg) +![](flatten11.jpg) **Input:** head = [1,2,3,4,5,6,null,null,null,7,8,9,10,null,null,11,12] **Output:** [1,2,3,7,8,11,12,9,10,4,5,6] -**Explanation:** The multilevel linked list in the input is shown. After flattening the multilevel linked list it becomes: ![](https://assets.leetcode.com/uploads/2021/11/09/flatten12.jpg) +**Explanation:** The multilevel linked list in the input is shown. After flattening the multilevel linked list it becomes: ![](flatten12.jpg) **Example 2:** -![](https://assets.leetcode.com/uploads/2021/11/09/flatten2.1jpg) +![](flatten2.1jpg) **Input:** head = [1,2,null,3] @@ -31,7 +31,7 @@ Return _the_ `head` _of the flattened list. The nodes in the list must have **al The multilevel linked list in the input is shown. After flattening the multilevel linked list it becomes: -![](https://assets.leetcode.com/uploads/2021/11/24/list.jpg) +![](list.jpg) **Example 3:** diff --git a/src/main/java/g0401_0500/s0437_path_sum_iii/pathsum3-1-tree.jpg b/src/main/java/g0401_0500/s0437_path_sum_iii/pathsum3-1-tree.jpg new file mode 100644 index 000000000..9c7fcc4cf Binary files /dev/null and b/src/main/java/g0401_0500/s0437_path_sum_iii/pathsum3-1-tree.jpg differ diff --git a/src/main/java/g0401_0500/s0437_path_sum_iii/readme.md b/src/main/java/g0401_0500/s0437_path_sum_iii/readme.md index aad654c0f..a287cd44c 100644 --- a/src/main/java/g0401_0500/s0437_path_sum_iii/readme.md +++ b/src/main/java/g0401_0500/s0437_path_sum_iii/readme.md @@ -8,7 +8,7 @@ The path does not need to start or end at the root or a leaf, but it must go dow **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/09/pathsum3-1-tree.jpg) +![](pathsum3-1-tree.jpg) **Input:** root = [10,5,-3,3,2,null,11,3,-2,null,1], targetSum = 8 diff --git a/src/main/java/g0401_0500/s0441_arranging_coins/arrangecoins1-grid.jpg b/src/main/java/g0401_0500/s0441_arranging_coins/arrangecoins1-grid.jpg new file mode 100644 index 000000000..ab02a46fd Binary files /dev/null and b/src/main/java/g0401_0500/s0441_arranging_coins/arrangecoins1-grid.jpg differ diff --git a/src/main/java/g0401_0500/s0441_arranging_coins/arrangecoins2-grid.jpg b/src/main/java/g0401_0500/s0441_arranging_coins/arrangecoins2-grid.jpg new file mode 100644 index 000000000..e03da2a4c Binary files /dev/null and b/src/main/java/g0401_0500/s0441_arranging_coins/arrangecoins2-grid.jpg differ diff --git a/src/main/java/g0401_0500/s0441_arranging_coins/readme.md b/src/main/java/g0401_0500/s0441_arranging_coins/readme.md index 24e18d437..c3acbc843 100644 --- a/src/main/java/g0401_0500/s0441_arranging_coins/readme.md +++ b/src/main/java/g0401_0500/s0441_arranging_coins/readme.md @@ -8,7 +8,7 @@ Given the integer `n`, return _the number of **complete rows** of the staircase **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/09/arrangecoins1-grid.jpg) +![](arrangecoins1-grid.jpg) **Input:** n = 5 @@ -18,7 +18,7 @@ Given the integer `n`, return _the number of **complete rows** of the staircase **Example 2:** -![](https://assets.leetcode.com/uploads/2021/04/09/arrangecoins2-grid.jpg) +![](arrangecoins2-grid.jpg) **Input:** n = 8 diff --git a/src/main/java/g0401_0500/s0445_add_two_numbers_ii/readme.md b/src/main/java/g0401_0500/s0445_add_two_numbers_ii/readme.md index abd9faab0..170333bc9 100644 --- a/src/main/java/g0401_0500/s0445_add_two_numbers_ii/readme.md +++ b/src/main/java/g0401_0500/s0445_add_two_numbers_ii/readme.md @@ -8,7 +8,7 @@ You may assume the two numbers do not contain any leading zero, except the numbe **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/09/sumii-linked-list.jpg) +![](sumii-linked-list.jpg) **Input:** l1 = [7,2,4,3], l2 = [5,6,4] diff --git a/src/main/java/g0401_0500/s0445_add_two_numbers_ii/sumii-linked-list.jpg b/src/main/java/g0401_0500/s0445_add_two_numbers_ii/sumii-linked-list.jpg new file mode 100644 index 000000000..193af51f9 Binary files /dev/null and b/src/main/java/g0401_0500/s0445_add_two_numbers_ii/sumii-linked-list.jpg differ diff --git a/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/del_node_1.jpg b/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/del_node_1.jpg new file mode 100644 index 000000000..838fd2305 Binary files /dev/null and b/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/del_node_1.jpg differ diff --git a/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/del_node_supp.jpg b/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/del_node_supp.jpg new file mode 100644 index 000000000..d49f9d668 Binary files /dev/null and b/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/del_node_supp.jpg differ diff --git a/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/readme.md b/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/readme.md index 45bdfd548..eb68dd281 100644 --- a/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/readme.md +++ b/src/main/java/g0401_0500/s0450_delete_node_in_a_bst/readme.md @@ -11,7 +11,7 @@ Basically, the deletion can be divided into two stages: **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/04/del_node_1.jpg) +![](del_node_1.jpg) **Input:** root = [5,3,6,2,4,null,7], key = 3 @@ -22,7 +22,7 @@ Basically, the deletion can be divided into two stages: Given key to delete is 3. So we find the node with value 3 and delete it. One valid answer is [5,4,6,2,null,null,7], shown in the above BST. Please notice that another valid answer is [5,2,6,null,4,null,7] and it's also accepted. -![](https://assets.leetcode.com/uploads/2020/09/04/del_node_supp.jpg) +![](del_node_supp.jpg) **Example 2:** diff --git a/src/main/java/g0401_0500/s0463_island_perimeter/island.png b/src/main/java/g0401_0500/s0463_island_perimeter/island.png new file mode 100644 index 000000000..76254a724 Binary files /dev/null and b/src/main/java/g0401_0500/s0463_island_perimeter/island.png differ diff --git a/src/main/java/g0401_0500/s0463_island_perimeter/readme.md b/src/main/java/g0401_0500/s0463_island_perimeter/readme.md index dffa9c183..70bd9fcb4 100644 --- a/src/main/java/g0401_0500/s0463_island_perimeter/readme.md +++ b/src/main/java/g0401_0500/s0463_island_perimeter/readme.md @@ -10,7 +10,7 @@ The island doesn't have "lakes", meaning the water inside isn't connected to the **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/12/island.png) +![](island.png) **Input:** grid = [[0,1,0,0],[1,1,1,0],[0,1,0,0],[1,1,0,0]] diff --git a/src/main/java/g0401_0500/s0473_matchsticks_to_square/matchsticks1-grid.jpg b/src/main/java/g0401_0500/s0473_matchsticks_to_square/matchsticks1-grid.jpg new file mode 100644 index 000000000..5a3df9e89 Binary files /dev/null and b/src/main/java/g0401_0500/s0473_matchsticks_to_square/matchsticks1-grid.jpg differ diff --git a/src/main/java/g0401_0500/s0473_matchsticks_to_square/readme.md b/src/main/java/g0401_0500/s0473_matchsticks_to_square/readme.md index 9d530744c..9d0f4e323 100644 --- a/src/main/java/g0401_0500/s0473_matchsticks_to_square/readme.md +++ b/src/main/java/g0401_0500/s0473_matchsticks_to_square/readme.md @@ -8,7 +8,7 @@ Return `true` if you can make this square and `false` otherwise. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/09/matchsticks1-grid.jpg) +![](matchsticks1-grid.jpg) **Input:** matchsticks = [1,1,2,2,2] diff --git a/src/main/java/g0401_0500/s0497_random_point_in_non_overlapping_rectangles/lc-pickrandomrec.jpg b/src/main/java/g0401_0500/s0497_random_point_in_non_overlapping_rectangles/lc-pickrandomrec.jpg new file mode 100644 index 000000000..029a6be00 Binary files /dev/null and b/src/main/java/g0401_0500/s0497_random_point_in_non_overlapping_rectangles/lc-pickrandomrec.jpg differ diff --git a/src/main/java/g0401_0500/s0497_random_point_in_non_overlapping_rectangles/readme.md b/src/main/java/g0401_0500/s0497_random_point_in_non_overlapping_rectangles/readme.md index 3103f8abc..9f964c18e 100644 --- a/src/main/java/g0401_0500/s0497_random_point_in_non_overlapping_rectangles/readme.md +++ b/src/main/java/g0401_0500/s0497_random_point_in_non_overlapping_rectangles/readme.md @@ -15,7 +15,7 @@ Implement the `Solution` class: **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/24/lc-pickrandomrec.jpg) +![](lc-pickrandomrec.jpg) **Input** ["Solution", "pick", "pick", "pick", "pick", "pick"] [[[[-2, -2, 1, 1], [2, 2, 4, 6]]], [], [], [], [], []] diff --git a/src/main/java/g0401_0500/s0498_diagonal_traverse/diag1-grid.jpg b/src/main/java/g0401_0500/s0498_diagonal_traverse/diag1-grid.jpg new file mode 100644 index 000000000..1bdadc651 Binary files /dev/null and b/src/main/java/g0401_0500/s0498_diagonal_traverse/diag1-grid.jpg differ diff --git a/src/main/java/g0401_0500/s0498_diagonal_traverse/readme.md b/src/main/java/g0401_0500/s0498_diagonal_traverse/readme.md index fecc289a1..7dc9be2b9 100644 --- a/src/main/java/g0401_0500/s0498_diagonal_traverse/readme.md +++ b/src/main/java/g0401_0500/s0498_diagonal_traverse/readme.md @@ -6,7 +6,7 @@ Given an `m x n` matrix `mat`, return _an array of all the elements of the array **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/10/diag1-grid.jpg) +![](diag1-grid.jpg) **Input:** mat = [[1,2,3],[4,5,6],[7,8,9]] diff --git a/src/main/java/g0401_0500/s0500_keyboard_row/keyboard.png b/src/main/java/g0401_0500/s0500_keyboard_row/keyboard.png new file mode 100644 index 000000000..11cd96970 Binary files /dev/null and b/src/main/java/g0401_0500/s0500_keyboard_row/keyboard.png differ diff --git a/src/main/java/g0401_0500/s0500_keyboard_row/readme.md b/src/main/java/g0401_0500/s0500_keyboard_row/readme.md index 00cdfad7f..650fbc388 100644 --- a/src/main/java/g0401_0500/s0500_keyboard_row/readme.md +++ b/src/main/java/g0401_0500/s0500_keyboard_row/readme.md @@ -10,7 +10,7 @@ In the **American keyboard**: * the second row consists of the characters `"asdfghjkl"`, and * the third row consists of the characters `"zxcvbnm"`. -![](https://assets.leetcode.com/uploads/2018/10/12/keyboard.png) +![](keyboard.png) **Example 1:** diff --git a/src/main/java/g0501_0600/s0501_find_mode_in_binary_search_tree/mode-tree.jpg b/src/main/java/g0501_0600/s0501_find_mode_in_binary_search_tree/mode-tree.jpg new file mode 100644 index 000000000..678a2edf9 Binary files /dev/null and b/src/main/java/g0501_0600/s0501_find_mode_in_binary_search_tree/mode-tree.jpg differ diff --git a/src/main/java/g0501_0600/s0501_find_mode_in_binary_search_tree/readme.md b/src/main/java/g0501_0600/s0501_find_mode_in_binary_search_tree/readme.md index 6b7203c91..e7120ad80 100644 --- a/src/main/java/g0501_0600/s0501_find_mode_in_binary_search_tree/readme.md +++ b/src/main/java/g0501_0600/s0501_find_mode_in_binary_search_tree/readme.md @@ -14,7 +14,7 @@ Assume a BST is defined as follows: **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/11/mode-tree.jpg) +![](mode-tree.jpg) **Input:** root = [1,null,2,2] diff --git a/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/freq1-tree.jpg b/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/freq1-tree.jpg new file mode 100644 index 000000000..b220ebab9 Binary files /dev/null and b/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/freq1-tree.jpg differ diff --git a/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/freq2-tree.jpg b/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/freq2-tree.jpg new file mode 100644 index 000000000..3eb10a4b1 Binary files /dev/null and b/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/freq2-tree.jpg differ diff --git a/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/readme.md b/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/readme.md index 55987f90f..d64ec6b01 100644 --- a/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/readme.md +++ b/src/main/java/g0501_0600/s0508_most_frequent_subtree_sum/readme.md @@ -8,7 +8,7 @@ The **subtree sum** of a node is defined as the sum of all the node values forme **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/24/freq1-tree.jpg) +![](freq1-tree.jpg) **Input:** root = [5,2,-3] @@ -16,7 +16,7 @@ The **subtree sum** of a node is defined as the sum of all the node values forme **Example 2:** -![](https://assets.leetcode.com/uploads/2021/04/24/freq2-tree.jpg) +![](freq2-tree.jpg) **Input:** root = [5,2,-5] diff --git a/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/readme.md b/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/readme.md index 399dc90b4..18bbae45a 100644 --- a/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/readme.md +++ b/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return the leftmost value in the last row of **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/14/tree1.jpg) +![](tree1.jpg) **Input:** root = [2,1,3] @@ -14,7 +14,7 @@ Given the `root` of a binary tree, return the leftmost value in the last row of **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/14/tree2.jpg) +![](tree2.jpg) **Input:** root = [1,2,3,4,null,5,6,null,null,7] diff --git a/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/tree1.jpg b/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/tree1.jpg new file mode 100644 index 000000000..88728f241 Binary files /dev/null and b/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/tree1.jpg differ diff --git a/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/tree2.jpg b/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/tree2.jpg new file mode 100644 index 000000000..7fb75fe83 Binary files /dev/null and b/src/main/java/g0501_0600/s0513_find_bottom_left_tree_value/tree2.jpg differ diff --git a/src/main/java/g0501_0600/s0514_freedom_trail/readme.md b/src/main/java/g0501_0600/s0514_freedom_trail/readme.md index b804b5f56..3f17000e2 100644 --- a/src/main/java/g0501_0600/s0514_freedom_trail/readme.md +++ b/src/main/java/g0501_0600/s0514_freedom_trail/readme.md @@ -15,7 +15,7 @@ At the stage of rotating the ring to spell the key character `key[i]`: **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/22/ring.jpg) +![](ring.jpg) **Input:** ring = "godding", key = "gd" diff --git a/src/main/java/g0501_0600/s0514_freedom_trail/ring.jpg b/src/main/java/g0501_0600/s0514_freedom_trail/ring.jpg new file mode 100644 index 000000000..d50ac1194 Binary files /dev/null and b/src/main/java/g0501_0600/s0514_freedom_trail/ring.jpg differ diff --git a/src/main/java/g0501_0600/s0515_find_largest_value_in_each_tree_row/largest_e1.jpg b/src/main/java/g0501_0600/s0515_find_largest_value_in_each_tree_row/largest_e1.jpg new file mode 100644 index 000000000..4f6916805 Binary files /dev/null and b/src/main/java/g0501_0600/s0515_find_largest_value_in_each_tree_row/largest_e1.jpg differ diff --git a/src/main/java/g0501_0600/s0515_find_largest_value_in_each_tree_row/readme.md b/src/main/java/g0501_0600/s0515_find_largest_value_in_each_tree_row/readme.md index ce5145753..f5ad548b8 100644 --- a/src/main/java/g0501_0600/s0515_find_largest_value_in_each_tree_row/readme.md +++ b/src/main/java/g0501_0600/s0515_find_largest_value_in_each_tree_row/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _an array of the largest value in each **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/21/largest_e1.jpg) +![](largest_e1.jpg) **Input:** root = [1,3,2,5,3,null,9] diff --git a/src/main/java/g0501_0600/s0529_minesweeper/minesweeper_example_1.png b/src/main/java/g0501_0600/s0529_minesweeper/minesweeper_example_1.png new file mode 100644 index 000000000..732293246 Binary files /dev/null and b/src/main/java/g0501_0600/s0529_minesweeper/minesweeper_example_1.png differ diff --git a/src/main/java/g0501_0600/s0529_minesweeper/minesweeper_example_2.png b/src/main/java/g0501_0600/s0529_minesweeper/minesweeper_example_2.png new file mode 100644 index 000000000..4fb383f0b Binary files /dev/null and b/src/main/java/g0501_0600/s0529_minesweeper/minesweeper_example_2.png differ diff --git a/src/main/java/g0501_0600/s0529_minesweeper/readme.md b/src/main/java/g0501_0600/s0529_minesweeper/readme.md index 545fe1eac..c3398f309 100644 --- a/src/main/java/g0501_0600/s0529_minesweeper/readme.md +++ b/src/main/java/g0501_0600/s0529_minesweeper/readme.md @@ -23,7 +23,7 @@ Return _the board after revealing this position according to the following rules **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/12/minesweeper_example_1.png) +![](minesweeper_example_1.png) **Input:** board = [["E","E","E","E","E"],["E","E","M","E","E"],["E","E","E","E","E"],["E","E","E","E","E"]], click = [3,0] @@ -31,7 +31,7 @@ Return _the board after revealing this position according to the following rules **Example 2:** -![](https://assets.leetcode.com/uploads/2018/10/12/minesweeper_example_2.png) +![](minesweeper_example_2.png) **Input:** board = [["B","1","E","1","B"],["B","1","M","1","B"],["B","1","1","1","B"],["B","B","B","B","B"]], click = [1,2] diff --git a/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/bst1.jpg b/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/bst1.jpg new file mode 100644 index 000000000..172130eb2 Binary files /dev/null and b/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/bst1.jpg differ diff --git a/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/bst2.jpg b/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/bst2.jpg new file mode 100644 index 000000000..34c3ae713 Binary files /dev/null and b/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/bst2.jpg differ diff --git a/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/readme.md b/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/readme.md index 2a52de1cb..0198ffd76 100644 --- a/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/readme.md +++ b/src/main/java/g0501_0600/s0530_minimum_absolute_difference_in_bst/readme.md @@ -6,7 +6,7 @@ Given the `root` of a Binary Search Tree (BST), return _the minimum absolute dif **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/05/bst1.jpg) +![](bst1.jpg) **Input:** root = [4,2,6,1,3] @@ -14,7 +14,7 @@ Given the `root` of a Binary Search Tree (BST), return _the minimum absolute dif **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/05/bst2.jpg) +![](bst2.jpg) **Input:** root = [1,0,48,null,null,12,49] diff --git a/src/main/java/g0501_0600/s0538_convert_bst_to_greater_tree/readme.md b/src/main/java/g0501_0600/s0538_convert_bst_to_greater_tree/readme.md index 119d15b2b..24393593d 100644 --- a/src/main/java/g0501_0600/s0538_convert_bst_to_greater_tree/readme.md +++ b/src/main/java/g0501_0600/s0538_convert_bst_to_greater_tree/readme.md @@ -12,7 +12,7 @@ As a reminder, a _binary search tree_ is a tree that satisfies these constraints **Example 1:** -![](https://assets.leetcode.com/uploads/2019/05/02/tree.png) +![](tree.png) **Input:** root = [4,1,6,0,2,5,7,null,null,null,3,null,null,null,8] diff --git a/src/main/java/g0501_0600/s0538_convert_bst_to_greater_tree/tree.png b/src/main/java/g0501_0600/s0538_convert_bst_to_greater_tree/tree.png new file mode 100644 index 000000000..fb2cfb543 Binary files /dev/null and b/src/main/java/g0501_0600/s0538_convert_bst_to_greater_tree/tree.png differ diff --git a/src/main/java/g0501_0600/s0542_01_matrix/01-1-grid.jpg b/src/main/java/g0501_0600/s0542_01_matrix/01-1-grid.jpg new file mode 100644 index 000000000..b52a761c3 Binary files /dev/null and b/src/main/java/g0501_0600/s0542_01_matrix/01-1-grid.jpg differ diff --git a/src/main/java/g0501_0600/s0542_01_matrix/01-2-grid.jpg b/src/main/java/g0501_0600/s0542_01_matrix/01-2-grid.jpg new file mode 100644 index 000000000..f28a7f339 Binary files /dev/null and b/src/main/java/g0501_0600/s0542_01_matrix/01-2-grid.jpg differ diff --git a/src/main/java/g0501_0600/s0542_01_matrix/readme.md b/src/main/java/g0501_0600/s0542_01_matrix/readme.md index a9dc9c3ce..8ba2344b8 100644 --- a/src/main/java/g0501_0600/s0542_01_matrix/readme.md +++ b/src/main/java/g0501_0600/s0542_01_matrix/readme.md @@ -8,7 +8,7 @@ The distance between two adjacent cells is `1`. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/24/01-1-grid.jpg) +![](01-1-grid.jpg) **Input:** mat = [[0,0,0],[0,1,0],[0,0,0]] @@ -16,7 +16,7 @@ The distance between two adjacent cells is `1`. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/04/24/01-2-grid.jpg) +![](01-2-grid.jpg) **Input:** mat = [[0,0,0],[0,1,0],[1,1,1]] diff --git a/src/main/java/g0501_0600/s0543_diameter_of_binary_tree/diamtree.jpg b/src/main/java/g0501_0600/s0543_diameter_of_binary_tree/diamtree.jpg new file mode 100644 index 000000000..d29db7401 Binary files /dev/null and b/src/main/java/g0501_0600/s0543_diameter_of_binary_tree/diamtree.jpg differ diff --git a/src/main/java/g0501_0600/s0543_diameter_of_binary_tree/readme.md b/src/main/java/g0501_0600/s0543_diameter_of_binary_tree/readme.md index a05ee9de8..ed21493e1 100644 --- a/src/main/java/g0501_0600/s0543_diameter_of_binary_tree/readme.md +++ b/src/main/java/g0501_0600/s0543_diameter_of_binary_tree/readme.md @@ -10,7 +10,7 @@ The **length** of a path between two nodes is represented by the number of edges **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/06/diamtree.jpg) +![](diamtree.jpg) **Input:** root = [1,2,3,4,5] diff --git a/src/main/java/g0501_0600/s0547_number_of_provinces/graph1.jpg b/src/main/java/g0501_0600/s0547_number_of_provinces/graph1.jpg new file mode 100644 index 000000000..4abf257b9 Binary files /dev/null and b/src/main/java/g0501_0600/s0547_number_of_provinces/graph1.jpg differ diff --git a/src/main/java/g0501_0600/s0547_number_of_provinces/graph2.jpg b/src/main/java/g0501_0600/s0547_number_of_provinces/graph2.jpg new file mode 100644 index 000000000..43afca411 Binary files /dev/null and b/src/main/java/g0501_0600/s0547_number_of_provinces/graph2.jpg differ diff --git a/src/main/java/g0501_0600/s0547_number_of_provinces/readme.md b/src/main/java/g0501_0600/s0547_number_of_provinces/readme.md index 2a047d064..6b3a3be39 100644 --- a/src/main/java/g0501_0600/s0547_number_of_provinces/readme.md +++ b/src/main/java/g0501_0600/s0547_number_of_provinces/readme.md @@ -12,7 +12,7 @@ Return _the total number of **provinces**_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/24/graph1.jpg) +![](graph1.jpg) **Input:** isConnected = [[1,1,0],[1,1,0],[0,0,1]] @@ -20,7 +20,7 @@ Return _the total number of **provinces**_. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/24/graph2.jpg) +![](graph2.jpg) **Input:** isConnected = [[1,0,0],[0,1,0],[0,0,1]] diff --git a/src/main/java/g0501_0600/s0554_brick_wall/cutwall-grid.jpg b/src/main/java/g0501_0600/s0554_brick_wall/cutwall-grid.jpg new file mode 100644 index 000000000..ec95ee445 Binary files /dev/null and b/src/main/java/g0501_0600/s0554_brick_wall/cutwall-grid.jpg differ diff --git a/src/main/java/g0501_0600/s0554_brick_wall/readme.md b/src/main/java/g0501_0600/s0554_brick_wall/readme.md index 4c004abc6..968964938 100644 --- a/src/main/java/g0501_0600/s0554_brick_wall/readme.md +++ b/src/main/java/g0501_0600/s0554_brick_wall/readme.md @@ -10,7 +10,7 @@ Given the 2D array `wall` that contains the information about the wall, return _ **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/24/cutwall-grid.jpg) +![](cutwall-grid.jpg) **Input:** wall = [[1,2,2,1],[3,1,2],[1,3,2],[2,4],[3,1,2],[1,3,1,1]] diff --git a/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/new_top.png b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/new_top.png new file mode 100644 index 000000000..f134c4ce1 Binary files /dev/null and b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/new_top.png differ diff --git a/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qt1.png b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qt1.png new file mode 100644 index 000000000..eeddc9be5 Binary files /dev/null and b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qt1.png differ diff --git a/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qt2.png b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qt2.png new file mode 100644 index 000000000..90403bcac Binary files /dev/null and b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qt2.png differ diff --git a/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qtr.png b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qtr.png new file mode 100644 index 000000000..7d9fa05f9 Binary files /dev/null and b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/qtr.png differ diff --git a/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/readme.md b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/readme.md index 768ab6c4b..463c92e4e 100644 --- a/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/readme.md +++ b/src/main/java/g0501_0600/s0558_logical_or_of_two_binary_grids_represented_as_quad_trees/readme.md @@ -30,7 +30,7 @@ We can construct a Quad-Tree from a two-dimensional area using the following ste 2. If the current grid has different values, set `isLeaf` to False and set `val` to any value and divide the current grid into four sub-grids as shown in the photo. 3. Recurse for each of the children with the proper sub-grid. -![](https://assets.leetcode.com/uploads/2020/02/11/new_top.png) +![](new_top.png) If you want to know more about the Quad-Tree, you can refer to the [wiki](https://en.wikipedia.org/wiki/Quadtree). @@ -44,13 +44,13 @@ If the value of `isLeaf` or `val` is True we represent it as **1** in the list ` **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/11/qt1.png) ![](https://assets.leetcode.com/uploads/2020/02/11/qt2.png) +![](qt1.png) ![](qt2.png) **Input:** quadTree1 = [[0,1],[1,1],[1,1],[1,0],[1,0]] , quadTree2 = [[0,1],[1,1],[0,1],[1,1],[1,0],null,null,null,null,[1,0],[1,0],[1,1],[1,1]] **Output:** [[0,0],[1,1],[1,1],[1,1],[1,0]] -**Explanation:** quadTree1 and quadTree2 are shown above. You can see the binary matrix which is represented by each Quad-Tree. If we apply logical bitwise OR on the two binary matrices we get the binary matrix below which is represented by the result Quad-Tree. Notice that the binary matrices shown are only for illustration, you don't have to construct the binary matrix to get the result tree. ![](https://assets.leetcode.com/uploads/2020/02/11/qtr.png) +**Explanation:** quadTree1 and quadTree2 are shown above. You can see the binary matrix which is represented by each Quad-Tree. If we apply logical bitwise OR on the two binary matrices we get the binary matrix below which is represented by the result Quad-Tree. Notice that the binary matrices shown are only for illustration, you don't have to construct the binary matrix to get the result tree. ![](qtr.png) **Example 2:** diff --git a/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/narytreeexample.png b/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/narytreeexample.png new file mode 100644 index 000000000..d28c543c8 Binary files /dev/null and b/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/narytreeexample.png differ diff --git a/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/readme.md b/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/readme.md index af0e65c47..aa2064740 100644 --- a/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/readme.md +++ b/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/readme.md @@ -10,7 +10,7 @@ _Nary-Tree input serialization is represented in their level order traversal, ea **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png) +![](narytreeexample.png) **Input:** root = [1,null,3,2,4,null,5,6] @@ -18,7 +18,7 @@ _Nary-Tree input serialization is represented in their level order traversal, ea **Example 2:** -![](https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png) +![](sample_4_964.png) **Input:** root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14] diff --git a/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/sample_4_964.png b/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/sample_4_964.png new file mode 100644 index 000000000..f4347c766 Binary files /dev/null and b/src/main/java/g0501_0600/s0559_maximum_depth_of_n_ary_tree/sample_4_964.png differ diff --git a/src/main/java/g0501_0600/s0563_binary_tree_tilt/readme.md b/src/main/java/g0501_0600/s0563_binary_tree_tilt/readme.md index a1654c35e..ae465914b 100644 --- a/src/main/java/g0501_0600/s0563_binary_tree_tilt/readme.md +++ b/src/main/java/g0501_0600/s0563_binary_tree_tilt/readme.md @@ -8,7 +8,7 @@ The **tilt** of a tree node is the **absolute difference** between the sum of al **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/20/tilt1.jpg) +![](tilt1.jpg) **Input:** root = [1,2,3] @@ -23,7 +23,7 @@ The **tilt** of a tree node is the **absolute difference** between the sum of al **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/20/tilt2.jpg) +![](tilt2.jpg) **Input:** root = [4,2,9,3,5,null,7] @@ -41,7 +41,7 @@ The **tilt** of a tree node is the **absolute difference** between the sum of al **Example 3:** -![](https://assets.leetcode.com/uploads/2020/10/20/tilt3.jpg) +![](tilt3.jpg) **Input:** root = [21,7,14,1,1,2,2,3,3] diff --git a/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt1.jpg b/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt1.jpg new file mode 100644 index 000000000..42114efbe Binary files /dev/null and b/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt1.jpg differ diff --git a/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt2.jpg b/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt2.jpg new file mode 100644 index 000000000..dd825cf77 Binary files /dev/null and b/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt2.jpg differ diff --git a/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt3.jpg b/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt3.jpg new file mode 100644 index 000000000..804a512c4 Binary files /dev/null and b/src/main/java/g0501_0600/s0563_binary_tree_tilt/tilt3.jpg differ diff --git a/src/main/java/g0501_0600/s0566_reshape_the_matrix/readme.md b/src/main/java/g0501_0600/s0566_reshape_the_matrix/readme.md index 29a6f06ca..61ad398a3 100644 --- a/src/main/java/g0501_0600/s0566_reshape_the_matrix/readme.md +++ b/src/main/java/g0501_0600/s0566_reshape_the_matrix/readme.md @@ -12,7 +12,7 @@ If the `reshape` operation with given parameters is possible and legal, output t **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/24/reshape1-grid.jpg) +![](reshape1-grid.jpg) **Input:** mat = [[1,2],[3,4]], r = 1, c = 4 @@ -20,7 +20,7 @@ If the `reshape` operation with given parameters is possible and legal, output t **Example 2:** -![](https://assets.leetcode.com/uploads/2021/04/24/reshape2-grid.jpg) +![](reshape2-grid.jpg) **Input:** mat = [[1,2],[3,4]], r = 2, c = 4 diff --git a/src/main/java/g0501_0600/s0566_reshape_the_matrix/reshape1-grid.jpg b/src/main/java/g0501_0600/s0566_reshape_the_matrix/reshape1-grid.jpg new file mode 100644 index 000000000..ba98b0912 Binary files /dev/null and b/src/main/java/g0501_0600/s0566_reshape_the_matrix/reshape1-grid.jpg differ diff --git a/src/main/java/g0501_0600/s0566_reshape_the_matrix/reshape2-grid.jpg b/src/main/java/g0501_0600/s0566_reshape_the_matrix/reshape2-grid.jpg new file mode 100644 index 000000000..529c4d44f Binary files /dev/null and b/src/main/java/g0501_0600/s0566_reshape_the_matrix/reshape2-grid.jpg differ diff --git a/src/main/java/g0501_0600/s0572_subtree_of_another_tree/readme.md b/src/main/java/g0501_0600/s0572_subtree_of_another_tree/readme.md index 565a50be6..9ec5b2d7d 100644 --- a/src/main/java/g0501_0600/s0572_subtree_of_another_tree/readme.md +++ b/src/main/java/g0501_0600/s0572_subtree_of_another_tree/readme.md @@ -8,7 +8,7 @@ A subtree of a binary tree `tree` is a tree that consists of a node in `tree` an **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/28/subtree1-tree.jpg) +![](subtree1-tree.jpg) **Input:** root = [3,4,5,1,2], subRoot = [4,1,2] @@ -16,7 +16,7 @@ A subtree of a binary tree `tree` is a tree that consists of a node in `tree` an **Example 2:** -![](https://assets.leetcode.com/uploads/2021/04/28/subtree2-tree.jpg) +![](subtree2-tree.jpg) **Input:** root = [3,4,5,1,2,null,null,null,null,0], subRoot = [4,1,2] diff --git a/src/main/java/g0501_0600/s0572_subtree_of_another_tree/subtree1-tree.jpg b/src/main/java/g0501_0600/s0572_subtree_of_another_tree/subtree1-tree.jpg new file mode 100644 index 000000000..10c49d6ea Binary files /dev/null and b/src/main/java/g0501_0600/s0572_subtree_of_another_tree/subtree1-tree.jpg differ diff --git a/src/main/java/g0501_0600/s0572_subtree_of_another_tree/subtree2-tree.jpg b/src/main/java/g0501_0600/s0572_subtree_of_another_tree/subtree2-tree.jpg new file mode 100644 index 000000000..740815221 Binary files /dev/null and b/src/main/java/g0501_0600/s0572_subtree_of_another_tree/subtree2-tree.jpg differ diff --git a/src/main/java/g0501_0600/s0576_out_of_boundary_paths/out_of_boundary_paths_1.png b/src/main/java/g0501_0600/s0576_out_of_boundary_paths/out_of_boundary_paths_1.png new file mode 100644 index 000000000..9a8619c82 Binary files /dev/null and b/src/main/java/g0501_0600/s0576_out_of_boundary_paths/out_of_boundary_paths_1.png differ diff --git a/src/main/java/g0501_0600/s0576_out_of_boundary_paths/out_of_boundary_paths_2.png b/src/main/java/g0501_0600/s0576_out_of_boundary_paths/out_of_boundary_paths_2.png new file mode 100644 index 000000000..dd022e422 Binary files /dev/null and b/src/main/java/g0501_0600/s0576_out_of_boundary_paths/out_of_boundary_paths_2.png differ diff --git a/src/main/java/g0501_0600/s0576_out_of_boundary_paths/readme.md b/src/main/java/g0501_0600/s0576_out_of_boundary_paths/readme.md index b85f0ba8d..28bd55ebb 100644 --- a/src/main/java/g0501_0600/s0576_out_of_boundary_paths/readme.md +++ b/src/main/java/g0501_0600/s0576_out_of_boundary_paths/readme.md @@ -8,7 +8,7 @@ Given the five integers `m`, `n`, `maxMove`, `startRow`, `startColumn`, return t **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/28/out_of_boundary_paths_1.png) +![](out_of_boundary_paths_1.png) **Input:** m = 2, n = 2, maxMove = 2, startRow = 0, startColumn = 0 @@ -16,7 +16,7 @@ Given the five integers `m`, `n`, `maxMove`, `startRow`, `startColumn`, return t **Example 2:** -![](https://assets.leetcode.com/uploads/2021/04/28/out_of_boundary_paths_2.png) +![](out_of_boundary_paths_2.png) **Input:** m = 1, n = 3, maxMove = 3, startRow = 0, startColumn = 1 diff --git a/src/main/java/g0501_0600/s0587_erect_the_fence/erect1-plane.jpg b/src/main/java/g0501_0600/s0587_erect_the_fence/erect1-plane.jpg new file mode 100644 index 000000000..69ac4c5e1 Binary files /dev/null and b/src/main/java/g0501_0600/s0587_erect_the_fence/erect1-plane.jpg differ diff --git a/src/main/java/g0501_0600/s0587_erect_the_fence/erect2-plane.jpg b/src/main/java/g0501_0600/s0587_erect_the_fence/erect2-plane.jpg new file mode 100644 index 000000000..5d6714c7b Binary files /dev/null and b/src/main/java/g0501_0600/s0587_erect_the_fence/erect2-plane.jpg differ diff --git a/src/main/java/g0501_0600/s0587_erect_the_fence/readme.md b/src/main/java/g0501_0600/s0587_erect_the_fence/readme.md index d249d10a5..36d20042f 100644 --- a/src/main/java/g0501_0600/s0587_erect_the_fence/readme.md +++ b/src/main/java/g0501_0600/s0587_erect_the_fence/readme.md @@ -10,7 +10,7 @@ Return _the coordinates of trees that are exactly located on the fence perimeter **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/24/erect2-plane.jpg) +![](erect2-plane.jpg) **Input:** points = [[1,1],[2,2],[2,0],[2,4],[3,3],[4,2]] @@ -18,7 +18,7 @@ Return _the coordinates of trees that are exactly located on the fence perimeter **Example 2:** -![](https://assets.leetcode.com/uploads/2021/04/24/erect1-plane.jpg) +![](erect1-plane.jpg) **Input:** points = [[1,2],[2,2],[4,2]] diff --git a/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/narytreeexample.png b/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/narytreeexample.png new file mode 100644 index 000000000..d28c543c8 Binary files /dev/null and b/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/narytreeexample.png differ diff --git a/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/readme.md b/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/readme.md index c847db244..54942799b 100644 --- a/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/readme.md +++ b/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/readme.md @@ -8,7 +8,7 @@ Nary-Tree input serialization is represented in their level order traversal. Eac **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png) +![](narytreeexample.png) **Input:** root = [1,null,3,2,4,null,5,6] @@ -16,7 +16,7 @@ Nary-Tree input serialization is represented in their level order traversal. Eac **Example 2:** -![](https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png) +![](sample_4_964.png) **Input:** root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14] diff --git a/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/sample_4_964.png b/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/sample_4_964.png new file mode 100644 index 000000000..f4347c766 Binary files /dev/null and b/src/main/java/g0501_0600/s0589_n_ary_tree_preorder_traversal/sample_4_964.png differ diff --git a/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/narytreeexample.png b/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/narytreeexample.png new file mode 100644 index 000000000..d28c543c8 Binary files /dev/null and b/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/narytreeexample.png differ diff --git a/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/readme.md b/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/readme.md index 6b1a78cc8..f79e53564 100644 --- a/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/readme.md +++ b/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/readme.md @@ -8,7 +8,7 @@ Nary-Tree input serialization is represented in their level order traversal. Eac **Example 1:** -![](https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png) +![](narytreeexample.png) **Input:** root = [1,null,3,2,4,null,5,6] @@ -16,7 +16,7 @@ Nary-Tree input serialization is represented in their level order traversal. Eac **Example 2:** -![](https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png) +![](sample_4_964.png) **Input:** root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14] diff --git a/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/sample_4_964.png b/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/sample_4_964.png new file mode 100644 index 000000000..f4347c766 Binary files /dev/null and b/src/main/java/g0501_0600/s0590_n_ary_tree_postorder_traversal/sample_4_964.png differ diff --git a/src/main/java/g0501_0600/s0598_range_addition_ii/ex1.jpg b/src/main/java/g0501_0600/s0598_range_addition_ii/ex1.jpg new file mode 100644 index 000000000..80b701213 Binary files /dev/null and b/src/main/java/g0501_0600/s0598_range_addition_ii/ex1.jpg differ diff --git a/src/main/java/g0501_0600/s0598_range_addition_ii/readme.md b/src/main/java/g0501_0600/s0598_range_addition_ii/readme.md index da3726ed4..681a66d20 100644 --- a/src/main/java/g0501_0600/s0598_range_addition_ii/readme.md +++ b/src/main/java/g0501_0600/s0598_range_addition_ii/readme.md @@ -8,7 +8,7 @@ Count and return _the number of maximum integers in the matrix after performing **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/02/ex1.jpg) +![](ex1.jpg) **Input:** m = 3, n = 3, ops = [[2,2],[3,3]] diff --git a/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/cons1-tree.jpg b/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/cons1-tree.jpg new file mode 100644 index 000000000..ff9efd34c Binary files /dev/null and b/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/cons1-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/cons2-tree.jpg b/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/cons2-tree.jpg new file mode 100644 index 000000000..36b7a472b Binary files /dev/null and b/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/cons2-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/readme.md b/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/readme.md index b9c54c421..684854612 100644 --- a/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/readme.md +++ b/src/main/java/g0601_0700/s0606_construct_string_from_binary_tree/readme.md @@ -8,7 +8,7 @@ Omit all the empty parenthesis pairs that do not affect the one-to-one mapping r **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/03/cons1-tree.jpg) +![](cons1-tree.jpg) **Input:** root = [1,2,3,4] @@ -18,7 +18,7 @@ Omit all the empty parenthesis pairs that do not affect the one-to-one mapping r **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/03/cons2-tree.jpg) +![](cons2-tree.jpg) **Input:** root = [1,2,3,null,4] diff --git a/src/main/java/g0601_0700/s0608_tree_node/readme.md b/src/main/java/g0601_0700/s0608_tree_node/readme.md index fbf39f01c..6ed74faee 100644 --- a/src/main/java/g0601_0700/s0608_tree_node/readme.md +++ b/src/main/java/g0601_0700/s0608_tree_node/readme.md @@ -30,7 +30,7 @@ The query result format is in the following example. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/10/22/tree1.jpg) +![](tree1.jpg) **Input:** @@ -67,7 +67,7 @@ Nodes 3, 4, and 5 are leaf nodes because they have parent nodes and they do not **Example 2:** -![](https://assets.leetcode.com/uploads/2021/10/22/tree2.jpg) +![](tree2.jpg) **Input:** diff --git a/src/main/java/g0601_0700/s0608_tree_node/tree1.jpg b/src/main/java/g0601_0700/s0608_tree_node/tree1.jpg new file mode 100644 index 000000000..819acaadf Binary files /dev/null and b/src/main/java/g0601_0700/s0608_tree_node/tree1.jpg differ diff --git a/src/main/java/g0601_0700/s0608_tree_node/tree2.jpg b/src/main/java/g0601_0700/s0608_tree_node/tree2.jpg new file mode 100644 index 000000000..3d6aa6fc6 Binary files /dev/null and b/src/main/java/g0601_0700/s0608_tree_node/tree2.jpg differ diff --git a/src/main/java/g0601_0700/s0617_merge_two_binary_trees/merge.jpg b/src/main/java/g0601_0700/s0617_merge_two_binary_trees/merge.jpg new file mode 100644 index 000000000..e5d33535a Binary files /dev/null and b/src/main/java/g0601_0700/s0617_merge_two_binary_trees/merge.jpg differ diff --git a/src/main/java/g0601_0700/s0617_merge_two_binary_trees/readme.md b/src/main/java/g0601_0700/s0617_merge_two_binary_trees/readme.md index b147cf9c2..a00e9f874 100644 --- a/src/main/java/g0601_0700/s0617_merge_two_binary_trees/readme.md +++ b/src/main/java/g0601_0700/s0617_merge_two_binary_trees/readme.md @@ -12,7 +12,7 @@ Return _the merged tree_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/05/merge.jpg) +![](merge.jpg) **Input:** root1 = [1,3,2,5], root2 = [2,1,3,null,4,null,7] diff --git a/src/main/java/g0601_0700/s0623_add_one_row_to_tree/add2-tree.jpg b/src/main/java/g0601_0700/s0623_add_one_row_to_tree/add2-tree.jpg new file mode 100644 index 000000000..543c7c42a Binary files /dev/null and b/src/main/java/g0601_0700/s0623_add_one_row_to_tree/add2-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0623_add_one_row_to_tree/addrow-tree.jpg b/src/main/java/g0601_0700/s0623_add_one_row_to_tree/addrow-tree.jpg new file mode 100644 index 000000000..8295b3bd9 Binary files /dev/null and b/src/main/java/g0601_0700/s0623_add_one_row_to_tree/addrow-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0623_add_one_row_to_tree/readme.md b/src/main/java/g0601_0700/s0623_add_one_row_to_tree/readme.md index 078499474..07f3e86c9 100644 --- a/src/main/java/g0601_0700/s0623_add_one_row_to_tree/readme.md +++ b/src/main/java/g0601_0700/s0623_add_one_row_to_tree/readme.md @@ -15,7 +15,7 @@ The adding rule is: **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/15/addrow-tree.jpg) +![](addrow-tree.jpg) **Input:** root = [4,2,6,3,1,5], val = 1, depth = 2 @@ -23,7 +23,7 @@ The adding rule is: **Example 2:** -![](https://assets.leetcode.com/uploads/2021/03/11/add2-tree.jpg) +![](add2-tree.jpg) **Input:** root = [4,2,null,3,1], val = 1, depth = 3 diff --git a/src/main/java/g0601_0700/s0636_exclusive_time_of_functions/diag1b.png b/src/main/java/g0601_0700/s0636_exclusive_time_of_functions/diag1b.png new file mode 100644 index 000000000..faad179a9 Binary files /dev/null and b/src/main/java/g0601_0700/s0636_exclusive_time_of_functions/diag1b.png differ diff --git a/src/main/java/g0601_0700/s0636_exclusive_time_of_functions/readme.md b/src/main/java/g0601_0700/s0636_exclusive_time_of_functions/readme.md index 35ce2de65..3c3154a04 100644 --- a/src/main/java/g0601_0700/s0636_exclusive_time_of_functions/readme.md +++ b/src/main/java/g0601_0700/s0636_exclusive_time_of_functions/readme.md @@ -14,7 +14,7 @@ Return _the **exclusive time** of each function in an array, where the value at **Example 1:** -![](https://assets.leetcode.com/uploads/2019/04/05/diag1b.png) +![](diag1b.png) **Input:** n = 2, logs = ["0:start:0","1:start:2","1:end:5","0:end:6"] diff --git a/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/avg1-tree.jpg b/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/avg1-tree.jpg new file mode 100644 index 000000000..767ce8ce9 Binary files /dev/null and b/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/avg1-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/avg2-tree.jpg b/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/avg2-tree.jpg new file mode 100644 index 000000000..dc157447c Binary files /dev/null and b/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/avg2-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/readme.md b/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/readme.md index 8bae0a477..e02b7edb8 100644 --- a/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/readme.md +++ b/src/main/java/g0601_0700/s0637_average_of_levels_in_binary_tree/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the average value of the nodes on eac **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/09/avg1-tree.jpg) +![](avg1-tree.jpg) **Input:** root = [3,9,20,null,null,15,7] @@ -14,7 +14,7 @@ Given the `root` of a binary tree, return _the average value of the nodes on eac **Example 2:** -![](https://assets.leetcode.com/uploads/2021/03/09/avg2-tree.jpg) +![](avg2-tree.jpg) **Input:** root = [3,9,20,15,7] diff --git a/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e1.jpg b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e1.jpg new file mode 100644 index 000000000..4712e19ce Binary files /dev/null and b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e1.jpg differ diff --git a/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e2.jpg b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e2.jpg new file mode 100644 index 000000000..31ac435a9 Binary files /dev/null and b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e2.jpg differ diff --git a/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e33.jpg b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e33.jpg new file mode 100644 index 000000000..a216a2eed Binary files /dev/null and b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/e33.jpg differ diff --git a/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/readme.md b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/readme.md index a4f405ae6..41b2be1c2 100644 --- a/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/readme.md +++ b/src/main/java/g0601_0700/s0652_find_duplicate_subtrees/readme.md @@ -10,7 +10,7 @@ Two trees are **duplicate** if they have the **same structure** with the **same **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/16/e1.jpg) +![](e1.jpg) **Input:** root = [1,2,3,4,null,2,4,null,null,4] @@ -18,7 +18,7 @@ Two trees are **duplicate** if they have the **same structure** with the **same **Example 2:** -![](https://assets.leetcode.com/uploads/2020/08/16/e2.jpg) +![](e2.jpg) **Input:** root = [2,1,1] @@ -26,7 +26,7 @@ Two trees are **duplicate** if they have the **same structure** with the **same **Example 3:** -![](https://assets.leetcode.com/uploads/2020/08/16/e33.jpg) +![](e33.jpg) **Input:** root = [2,2,2,3,null,3,null] diff --git a/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/readme.md b/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/readme.md index 829dbad1b..afd105da6 100644 --- a/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/readme.md +++ b/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/readme.md @@ -6,7 +6,7 @@ Given the `root` of a Binary Search Tree and a target number `k`, return _`true` **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/21/sum_tree_1.jpg) +![](sum_tree_1.jpg) **Input:** root = [5,3,6,2,4,null,7], k = 9 @@ -14,7 +14,7 @@ Given the `root` of a Binary Search Tree and a target number `k`, return _`true` **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/21/sum_tree_2.jpg) +![](sum_tree_2.jpg) **Input:** root = [5,3,6,2,4,null,7], k = 28 diff --git a/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/sum_tree_1.jpg b/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/sum_tree_1.jpg new file mode 100644 index 000000000..4bdff7332 Binary files /dev/null and b/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/sum_tree_1.jpg differ diff --git a/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/sum_tree_2.jpg b/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/sum_tree_2.jpg new file mode 100644 index 000000000..d743af59a Binary files /dev/null and b/src/main/java/g0601_0700/s0653_two_sum_iv_input_is_a_bst/sum_tree_2.jpg differ diff --git a/src/main/java/g0601_0700/s0654_maximum_binary_tree/readme.md b/src/main/java/g0601_0700/s0654_maximum_binary_tree/readme.md index 736070e70..811875aaf 100644 --- a/src/main/java/g0601_0700/s0654_maximum_binary_tree/readme.md +++ b/src/main/java/g0601_0700/s0654_maximum_binary_tree/readme.md @@ -12,7 +12,7 @@ Return _the **maximum binary tree** built from_ `nums`. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/24/tree1.jpg) +![](tree1.jpg) **Input:** nums = [3,2,1,6,0,5] @@ -40,7 +40,7 @@ Return _the **maximum binary tree** built from_ `nums`. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/24/tree2.jpg) +![](tree2.jpg) **Input:** nums = [3,2,1] diff --git a/src/main/java/g0601_0700/s0654_maximum_binary_tree/tree1.jpg b/src/main/java/g0601_0700/s0654_maximum_binary_tree/tree1.jpg new file mode 100644 index 000000000..661b9c112 Binary files /dev/null and b/src/main/java/g0601_0700/s0654_maximum_binary_tree/tree1.jpg differ diff --git a/src/main/java/g0601_0700/s0654_maximum_binary_tree/tree2.jpg b/src/main/java/g0601_0700/s0654_maximum_binary_tree/tree2.jpg new file mode 100644 index 000000000..af0061247 Binary files /dev/null and b/src/main/java/g0601_0700/s0654_maximum_binary_tree/tree2.jpg differ diff --git a/src/main/java/g0601_0700/s0655_print_binary_tree/print1-tree.jpg b/src/main/java/g0601_0700/s0655_print_binary_tree/print1-tree.jpg new file mode 100644 index 000000000..7cf8660a9 Binary files /dev/null and b/src/main/java/g0601_0700/s0655_print_binary_tree/print1-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0655_print_binary_tree/print2-tree.jpg b/src/main/java/g0601_0700/s0655_print_binary_tree/print2-tree.jpg new file mode 100644 index 000000000..7aab65f7c Binary files /dev/null and b/src/main/java/g0601_0700/s0655_print_binary_tree/print2-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0655_print_binary_tree/readme.md b/src/main/java/g0601_0700/s0655_print_binary_tree/readme.md index d429e4ef0..9c531c069 100644 --- a/src/main/java/g0601_0700/s0655_print_binary_tree/readme.md +++ b/src/main/java/g0601_0700/s0655_print_binary_tree/readme.md @@ -15,7 +15,7 @@ Return _the constructed matrix_ `res`. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/03/print1-tree.jpg) +![](print1-tree.jpg) **Input:** root = [1,2] @@ -23,7 +23,7 @@ Return _the constructed matrix_ `res`. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/03/print2-tree.jpg) +![](print2-tree.jpg) **Input:** root = [1,2,3,null,4] diff --git a/src/main/java/g0601_0700/s0661_image_smoother/readme.md b/src/main/java/g0601_0700/s0661_image_smoother/readme.md index 5fc63898f..34bfb5306 100644 --- a/src/main/java/g0601_0700/s0661_image_smoother/readme.md +++ b/src/main/java/g0601_0700/s0661_image_smoother/readme.md @@ -4,13 +4,13 @@ Easy An **image smoother** is a filter of the size `3 x 3` that can be applied to each cell of an image by rounding down the average of the cell and the eight surrounding cells (i.e., the average of the nine cells in the blue smoother). If one or more of the surrounding cells of a cell is not present, we do not consider it in the average (i.e., the average of the four cells in the red smoother). -![](https://assets.leetcode.com/uploads/2021/05/03/smoother-grid.jpg) +![](smoother-grid.jpg) Given an `m x n` integer matrix `img` representing the grayscale of an image, return _the image after applying the smoother on each cell of it_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/03/smooth-grid.jpg) +![](smooth-grid.jpg) **Input:** img = [[1,1,1],[1,0,1],[1,1,1]] @@ -26,7 +26,7 @@ For the point (1,1): floor(8/9) = floor(0.88888889) = 0 **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/03/smooth2-grid.jpg) +![](smooth2-grid.jpg) **Input:** img = [[100,200,100],[200,50,200],[100,200,100]] diff --git a/src/main/java/g0601_0700/s0661_image_smoother/smooth-grid.jpg b/src/main/java/g0601_0700/s0661_image_smoother/smooth-grid.jpg new file mode 100644 index 000000000..7eaf1fcbc Binary files /dev/null and b/src/main/java/g0601_0700/s0661_image_smoother/smooth-grid.jpg differ diff --git a/src/main/java/g0601_0700/s0661_image_smoother/smooth2-grid.jpg b/src/main/java/g0601_0700/s0661_image_smoother/smooth2-grid.jpg new file mode 100644 index 000000000..21862bf49 Binary files /dev/null and b/src/main/java/g0601_0700/s0661_image_smoother/smooth2-grid.jpg differ diff --git a/src/main/java/g0601_0700/s0661_image_smoother/smoother-grid.jpg b/src/main/java/g0601_0700/s0661_image_smoother/smoother-grid.jpg new file mode 100644 index 000000000..cfdaae8aa Binary files /dev/null and b/src/main/java/g0601_0700/s0661_image_smoother/smoother-grid.jpg differ diff --git a/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/readme.md b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/readme.md index d8a6ba521..976dd2b1e 100644 --- a/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/readme.md +++ b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/readme.md @@ -12,7 +12,7 @@ It is **guaranteed** that the answer will in the range of **32-bit** signed inte **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/03/width1-tree.jpg) +![](width1-tree.jpg) **Input:** root = [1,3,2,5,3,null,9] @@ -22,7 +22,7 @@ It is **guaranteed** that the answer will in the range of **32-bit** signed inte **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/03/width2-tree.jpg) +![](width2-tree.jpg) **Input:** root = [1,3,null,5,3] @@ -32,7 +32,7 @@ It is **guaranteed** that the answer will in the range of **32-bit** signed inte **Example 3:** -![](https://assets.leetcode.com/uploads/2021/05/03/width3-tree.jpg) +![](width3-tree.jpg) **Input:** root = [1,3,2,5] diff --git a/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width1-tree.jpg b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width1-tree.jpg new file mode 100644 index 000000000..29cc5a6c1 Binary files /dev/null and b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width1-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width2-tree.jpg b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width2-tree.jpg new file mode 100644 index 000000000..481074a37 Binary files /dev/null and b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width2-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width3-tree.jpg b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width3-tree.jpg new file mode 100644 index 000000000..6a2235a3b Binary files /dev/null and b/src/main/java/g0601_0700/s0662_maximum_width_of_binary_tree/width3-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/multtable1-grid.jpg b/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/multtable1-grid.jpg new file mode 100644 index 000000000..2a2f3009f Binary files /dev/null and b/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/multtable1-grid.jpg differ diff --git a/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/multtable2-grid.jpg b/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/multtable2-grid.jpg new file mode 100644 index 000000000..e28c8e2a4 Binary files /dev/null and b/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/multtable2-grid.jpg differ diff --git a/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/readme.md b/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/readme.md index 44bdddf02..374fb53e6 100644 --- a/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/readme.md +++ b/src/main/java/g0601_0700/s0668_kth_smallest_number_in_multiplication_table/readme.md @@ -8,7 +8,7 @@ Given three integers `m`, `n`, and `k`, return _the_ kth **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/02/multtable1-grid.jpg) +![](multtable1-grid.jpg) **Input:** m = 3, n = 3, k = 5 @@ -18,7 +18,7 @@ Given three integers `m`, `n`, and `k`, return _the_ kth **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/02/multtable2-grid.jpg) +![](multtable2-grid.jpg) **Input:** m = 2, n = 3, k = 6 diff --git a/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/readme.md b/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/readme.md index 66edd1b6d..4f58ff82f 100644 --- a/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/readme.md +++ b/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/readme.md @@ -8,7 +8,7 @@ Return _the root of the trimmed binary search tree_. Note that the root may chan **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/09/trim1.jpg) +![](trim1.jpg) **Input:** root = [1,0,2], low = 1, high = 2 @@ -16,7 +16,7 @@ Return _the root of the trimmed binary search tree_. Note that the root may chan **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/09/trim2.jpg) +![](trim2.jpg) **Input:** root = [3,0,4,null,2,null,null,1], low = 1, high = 3 diff --git a/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/trim1.jpg b/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/trim1.jpg new file mode 100644 index 000000000..47592853a Binary files /dev/null and b/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/trim1.jpg differ diff --git a/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/trim2.jpg b/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/trim2.jpg new file mode 100644 index 000000000..491ee9a02 Binary files /dev/null and b/src/main/java/g0601_0700/s0669_trim_a_binary_search_tree/trim2.jpg differ diff --git a/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/readme.md b/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/readme.md index 5353bc2bf..acd80b831 100644 --- a/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/readme.md +++ b/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/readme.md @@ -10,7 +10,7 @@ If no such second minimum value exists, output -1 instead. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/15/smbt1.jpg) +![](smbt1.jpg) **Input:** root = [2,2,5,null,null,5,7] @@ -20,7 +20,7 @@ If no such second minimum value exists, output -1 instead. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/15/smbt2.jpg) +![](smbt2.jpg) **Input:** root = [2,2,2] diff --git a/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/smbt1.jpg b/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/smbt1.jpg new file mode 100644 index 000000000..bc923be9f Binary files /dev/null and b/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/smbt1.jpg differ diff --git a/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/smbt2.jpg b/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/smbt2.jpg new file mode 100644 index 000000000..67d686669 Binary files /dev/null and b/src/main/java/g0601_0700/s0671_second_minimum_node_in_a_binary_tree/smbt2.jpg differ diff --git a/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/readme.md b/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/readme.md index 218e56045..1571048d3 100644 --- a/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/readme.md +++ b/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/readme.md @@ -18,7 +18,7 @@ You are guaranteed that no two trees have the same height, and there is at least **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/26/trees1.jpg) +![](trees1.jpg) **Input:** forest = [[1,2,3],[0,0,4],[7,6,5]] @@ -28,7 +28,7 @@ You are guaranteed that no two trees have the same height, and there is at least **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/26/trees2.jpg) +![](trees2.jpg) **Input:** forest = [[1,2,3],[0,0,0],[7,6,5]] diff --git a/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/trees1.jpg b/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/trees1.jpg new file mode 100644 index 000000000..24984a928 Binary files /dev/null and b/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/trees1.jpg differ diff --git a/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/trees2.jpg b/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/trees2.jpg new file mode 100644 index 000000000..10f0724eb Binary files /dev/null and b/src/main/java/g0601_0700/s0675_cut_off_trees_for_golf_event/trees2.jpg differ diff --git a/src/main/java/g0601_0700/s0684_redundant_connection/readme.md b/src/main/java/g0601_0700/s0684_redundant_connection/readme.md index 66606b7bf..10f403077 100644 --- a/src/main/java/g0601_0700/s0684_redundant_connection/readme.md +++ b/src/main/java/g0601_0700/s0684_redundant_connection/readme.md @@ -10,7 +10,7 @@ Return _an edge that can be removed so that the resulting graph is a tree of_ `n **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/02/reduntant1-1-graph.jpg) +![](reduntant1-1-graph.jpg) **Input:** edges = [[1,2],[1,3],[2,3]] @@ -18,7 +18,7 @@ Return _an edge that can be removed so that the resulting graph is a tree of_ `n **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/02/reduntant1-2-graph.jpg) +![](reduntant1-2-graph.jpg) **Input:** edges = [[1,2],[2,3],[3,4],[1,4],[1,5]] diff --git a/src/main/java/g0601_0700/s0684_redundant_connection/reduntant1-1-graph.jpg b/src/main/java/g0601_0700/s0684_redundant_connection/reduntant1-1-graph.jpg new file mode 100644 index 000000000..5baf163b1 Binary files /dev/null and b/src/main/java/g0601_0700/s0684_redundant_connection/reduntant1-1-graph.jpg differ diff --git a/src/main/java/g0601_0700/s0684_redundant_connection/reduntant1-2-graph.jpg b/src/main/java/g0601_0700/s0684_redundant_connection/reduntant1-2-graph.jpg new file mode 100644 index 000000000..72d729161 Binary files /dev/null and b/src/main/java/g0601_0700/s0684_redundant_connection/reduntant1-2-graph.jpg differ diff --git a/src/main/java/g0601_0700/s0685_redundant_connection_ii/graph1.jpg b/src/main/java/g0601_0700/s0685_redundant_connection_ii/graph1.jpg new file mode 100644 index 000000000..1f9ebd635 Binary files /dev/null and b/src/main/java/g0601_0700/s0685_redundant_connection_ii/graph1.jpg differ diff --git a/src/main/java/g0601_0700/s0685_redundant_connection_ii/graph2.jpg b/src/main/java/g0601_0700/s0685_redundant_connection_ii/graph2.jpg new file mode 100644 index 000000000..f4fc940e3 Binary files /dev/null and b/src/main/java/g0601_0700/s0685_redundant_connection_ii/graph2.jpg differ diff --git a/src/main/java/g0601_0700/s0685_redundant_connection_ii/readme.md b/src/main/java/g0601_0700/s0685_redundant_connection_ii/readme.md index 5ac966997..c18a6f992 100644 --- a/src/main/java/g0601_0700/s0685_redundant_connection_ii/readme.md +++ b/src/main/java/g0601_0700/s0685_redundant_connection_ii/readme.md @@ -12,7 +12,7 @@ Return _an edge that can be removed so that the resulting graph is a rooted tree **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/20/graph1.jpg) +![](graph1.jpg) **Input:** edges = [[1,2],[1,3],[2,3]] @@ -20,7 +20,7 @@ Return _an edge that can be removed so that the resulting graph is a rooted tree **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/20/graph2.jpg) +![](graph2.jpg) **Input:** edges = [[1,2],[2,3],[3,4],[4,1],[1,5]] diff --git a/src/main/java/g0601_0700/s0687_longest_univalue_path/ex1.jpg b/src/main/java/g0601_0700/s0687_longest_univalue_path/ex1.jpg new file mode 100644 index 000000000..3cd35d044 Binary files /dev/null and b/src/main/java/g0601_0700/s0687_longest_univalue_path/ex1.jpg differ diff --git a/src/main/java/g0601_0700/s0687_longest_univalue_path/ex2.jpg b/src/main/java/g0601_0700/s0687_longest_univalue_path/ex2.jpg new file mode 100644 index 000000000..7020f5c21 Binary files /dev/null and b/src/main/java/g0601_0700/s0687_longest_univalue_path/ex2.jpg differ diff --git a/src/main/java/g0601_0700/s0687_longest_univalue_path/readme.md b/src/main/java/g0601_0700/s0687_longest_univalue_path/readme.md index db297e19b..59344eba8 100644 --- a/src/main/java/g0601_0700/s0687_longest_univalue_path/readme.md +++ b/src/main/java/g0601_0700/s0687_longest_univalue_path/readme.md @@ -8,7 +8,7 @@ Given the `root` of a binary tree, return _the length of the longest path, where **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/13/ex1.jpg) +![](ex1.jpg) **Input:** root = [5,4,5,1,1,5] @@ -16,7 +16,7 @@ Given the `root` of a binary tree, return _the length of the longest path, where **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/13/ex2.jpg) +![](ex2.jpg) **Input:** root = [1,4,5,4,4,5] diff --git a/src/main/java/g0601_0700/s0688_knight_probability_in_chessboard/knight.png b/src/main/java/g0601_0700/s0688_knight_probability_in_chessboard/knight.png new file mode 100644 index 000000000..b3cd5dd8e Binary files /dev/null and b/src/main/java/g0601_0700/s0688_knight_probability_in_chessboard/knight.png differ diff --git a/src/main/java/g0601_0700/s0688_knight_probability_in_chessboard/readme.md b/src/main/java/g0601_0700/s0688_knight_probability_in_chessboard/readme.md index b5fd7ced6..82c7ce1b9 100644 --- a/src/main/java/g0601_0700/s0688_knight_probability_in_chessboard/readme.md +++ b/src/main/java/g0601_0700/s0688_knight_probability_in_chessboard/readme.md @@ -6,7 +6,7 @@ On an `n x n` chessboard, a knight starts at the cell `(row, column)` and attemp A chess knight has eight possible moves it can make, as illustrated below. Each move is two cells in a cardinal direction, then one cell in an orthogonal direction. -![](https://assets.leetcode.com/uploads/2018/10/12/knight.png) +![](knight.png) Each time the knight is to move, it chooses one of eight possible moves uniformly at random (even if the piece would go off the chessboard) and moves there. diff --git a/src/main/java/g0601_0700/s0690_employee_importance/emp1-tree.jpg b/src/main/java/g0601_0700/s0690_employee_importance/emp1-tree.jpg new file mode 100644 index 000000000..d2bb2f2dd Binary files /dev/null and b/src/main/java/g0601_0700/s0690_employee_importance/emp1-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0690_employee_importance/emp2-tree.jpg b/src/main/java/g0601_0700/s0690_employee_importance/emp2-tree.jpg new file mode 100644 index 000000000..9556b99f0 Binary files /dev/null and b/src/main/java/g0601_0700/s0690_employee_importance/emp2-tree.jpg differ diff --git a/src/main/java/g0601_0700/s0690_employee_importance/readme.md b/src/main/java/g0601_0700/s0690_employee_importance/readme.md index a68c02471..5a89f6d60 100644 --- a/src/main/java/g0601_0700/s0690_employee_importance/readme.md +++ b/src/main/java/g0601_0700/s0690_employee_importance/readme.md @@ -14,7 +14,7 @@ Given an integer `id` that represents an employee's ID, return _the **total** im **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/31/emp1-tree.jpg) +![](emp1-tree.jpg) **Input:** employees = [[1,5,[2,3]],[2,3,[]],[3,3,[]]], id = 1 @@ -30,7 +30,7 @@ Thus, the total importance value of employee 1 is 5 + 3 + 3 = 11. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/31/emp2-tree.jpg) +![](emp2-tree.jpg) **Input:** employees = [[1,2,[5]],[5,-3,[]]], id = 5 diff --git a/src/main/java/g0601_0700/s0695_max_area_of_island/maxarea1-grid.jpg b/src/main/java/g0601_0700/s0695_max_area_of_island/maxarea1-grid.jpg new file mode 100644 index 000000000..127b54089 Binary files /dev/null and b/src/main/java/g0601_0700/s0695_max_area_of_island/maxarea1-grid.jpg differ diff --git a/src/main/java/g0601_0700/s0695_max_area_of_island/readme.md b/src/main/java/g0601_0700/s0695_max_area_of_island/readme.md index b6f84da1f..b0387abd7 100644 --- a/src/main/java/g0601_0700/s0695_max_area_of_island/readme.md +++ b/src/main/java/g0601_0700/s0695_max_area_of_island/readme.md @@ -10,7 +10,7 @@ Return _the maximum **area** of an island in_ `grid`. If there is no island, ret **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/01/maxarea1-grid.jpg) +![](maxarea1-grid.jpg) **Input:** grid = [[0,0,1,0,0,0,0,1,0,0,0,0,0],[0,0,0,0,0,0,0,1,1,1,0,0,0],[0,1,1,0,1,0,0,0,0,0,0,0,0],[0,1,0,0,1,1,0,0,1,0,1,0,0],[0,1,0,0,1,1,0,0,1,1,1,0,0],[0,0,0,0,0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,1,1,1,0,0,0],[0,0,0,0,0,0,0,1,1,0,0,0,0]] diff --git a/src/main/java/g0601_0700/s0699_falling_squares/fallingsq1-plane.jpg b/src/main/java/g0601_0700/s0699_falling_squares/fallingsq1-plane.jpg new file mode 100644 index 000000000..68c1a4808 Binary files /dev/null and b/src/main/java/g0601_0700/s0699_falling_squares/fallingsq1-plane.jpg differ diff --git a/src/main/java/g0601_0700/s0699_falling_squares/readme.md b/src/main/java/g0601_0700/s0699_falling_squares/readme.md index 3bcd09387..ee6ba62ce 100644 --- a/src/main/java/g0601_0700/s0699_falling_squares/readme.md +++ b/src/main/java/g0601_0700/s0699_falling_squares/readme.md @@ -14,7 +14,7 @@ Return _an integer array_ `ans` _where_ `ans[i]` _represents the height describe **Example 1:** -![](https://assets.leetcode.com/uploads/2021/04/28/fallingsq1-plane.jpg) +![](fallingsq1-plane.jpg) **Input:** positions = [[1,2],[2,3],[6,1]] diff --git a/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/readme.md b/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/readme.md index 523d96a95..b89bdfb1e 100644 --- a/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/readme.md +++ b/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/readme.md @@ -8,7 +8,7 @@ Find the node in the BST that the node's value equals `val` and return the subtr **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/12/tree1.jpg) +![](tree1.jpg) **Input:** root = [4,2,7,1,3], val = 2 @@ -16,7 +16,7 @@ Find the node in the BST that the node's value equals `val` and return the subtr **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/12/tree2.jpg) +![](tree2.jpg) **Input:** root = [4,2,7,1,3], val = 5 diff --git a/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/tree1.jpg b/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/tree1.jpg new file mode 100644 index 000000000..ce67d2ad9 Binary files /dev/null and b/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/tree1.jpg differ diff --git a/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/tree2.jpg b/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/tree2.jpg new file mode 100644 index 000000000..5b3f28937 Binary files /dev/null and b/src/main/java/g0601_0700/s0700_search_in_a_binary_search_tree/tree2.jpg differ diff --git a/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/bst.jpg b/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/bst.jpg new file mode 100644 index 000000000..c14f1c002 Binary files /dev/null and b/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/bst.jpg differ diff --git a/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/insertbst.jpg b/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/insertbst.jpg new file mode 100644 index 000000000..54d35ebef Binary files /dev/null and b/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/insertbst.jpg differ diff --git a/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/readme.md b/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/readme.md index 816c13779..87c7e705e 100644 --- a/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/readme.md +++ b/src/main/java/g0701_0800/s0701_insert_into_a_binary_search_tree/readme.md @@ -8,13 +8,13 @@ You are given the `root` node of a binary search tree (BST) and a `value` to ins **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/05/insertbst.jpg) +![](insertbst.jpg) **Input:** root = [4,2,7,1,3], val = 5 **Output:** [4,2,7,1,3,5] -**Explanation:** Another accepted tree is: ![](https://assets.leetcode.com/uploads/2020/10/05/bst.jpg) +**Explanation:** Another accepted tree is: ![](bst.jpg) **Example 2:** diff --git a/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/readme.md b/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/readme.md index c181f2d4a..4c3363566 100644 --- a/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/readme.md +++ b/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/readme.md @@ -12,7 +12,7 @@ Return _an array of the_ `k` _parts_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/13/split1-lc.jpg) +![](split1-lc.jpg) **Input:** head = [1,2,3], k = 5 @@ -26,7 +26,7 @@ The last element output[4] is null, but its string representation as a ListNode **Example 2:** -![](https://assets.leetcode.com/uploads/2021/06/13/split2-lc.jpg) +![](split2-lc.jpg) **Input:** head = [1,2,3,4,5,6,7,8,9,10], k = 3 diff --git a/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/split1-lc.jpg b/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/split1-lc.jpg new file mode 100644 index 000000000..96da645c6 Binary files /dev/null and b/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/split1-lc.jpg differ diff --git a/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/split2-lc.jpg b/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/split2-lc.jpg new file mode 100644 index 000000000..00e787aea Binary files /dev/null and b/src/main/java/g0701_0800/s0725_split_linked_list_in_parts/split2-lc.jpg differ diff --git a/src/main/java/g0701_0800/s0733_flood_fill/flood1-grid.jpg b/src/main/java/g0701_0800/s0733_flood_fill/flood1-grid.jpg new file mode 100644 index 000000000..bd7ba981e Binary files /dev/null and b/src/main/java/g0701_0800/s0733_flood_fill/flood1-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0733_flood_fill/readme.md b/src/main/java/g0701_0800/s0733_flood_fill/readme.md index 773dbb99f..b70507784 100644 --- a/src/main/java/g0701_0800/s0733_flood_fill/readme.md +++ b/src/main/java/g0701_0800/s0733_flood_fill/readme.md @@ -12,7 +12,7 @@ Return _the modified image after performing the flood fill_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/01/flood1-grid.jpg) +![](flood1-grid.jpg) **Input:** image = [[1,1,1],[1,1,0],[1,0,1]], sr = 1, sc = 1, newColor = 2 diff --git a/src/main/java/g0701_0800/s0741_cherry_pickup/grid.jpg b/src/main/java/g0701_0800/s0741_cherry_pickup/grid.jpg new file mode 100644 index 000000000..fe781762e Binary files /dev/null and b/src/main/java/g0701_0800/s0741_cherry_pickup/grid.jpg differ diff --git a/src/main/java/g0701_0800/s0741_cherry_pickup/readme.md b/src/main/java/g0701_0800/s0741_cherry_pickup/readme.md index a72faa811..1182ff2be 100644 --- a/src/main/java/g0701_0800/s0741_cherry_pickup/readme.md +++ b/src/main/java/g0701_0800/s0741_cherry_pickup/readme.md @@ -17,7 +17,7 @@ Return _the maximum number of cherries you can collect by following the rules be **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/14/grid.jpg) +![](grid.jpg) **Input:** grid = [[0,1,-1],[1,0,-1],[1,1,1]] diff --git a/src/main/java/g0701_0800/s0743_network_delay_time/931_example_1.png b/src/main/java/g0701_0800/s0743_network_delay_time/931_example_1.png new file mode 100644 index 000000000..3b07d8364 Binary files /dev/null and b/src/main/java/g0701_0800/s0743_network_delay_time/931_example_1.png differ diff --git a/src/main/java/g0701_0800/s0743_network_delay_time/readme.md b/src/main/java/g0701_0800/s0743_network_delay_time/readme.md index 69b85a72c..45311dc4f 100644 --- a/src/main/java/g0701_0800/s0743_network_delay_time/readme.md +++ b/src/main/java/g0701_0800/s0743_network_delay_time/readme.md @@ -8,7 +8,7 @@ We will send a signal from a given node `k`. Return the time it takes for all th **Example 1:** -![](https://assets.leetcode.com/uploads/2019/05/23/931_example_1.png) +![](931_example_1.png) **Input:** times = [[2,1,1],[2,3,1],[3,4,1]], n = 4, k = 2 diff --git a/src/main/java/g0701_0800/s0749_contain_virus/readme.md b/src/main/java/g0701_0800/s0749_contain_virus/readme.md index b16980a06..2ebf976d3 100644 --- a/src/main/java/g0701_0800/s0749_contain_virus/readme.md +++ b/src/main/java/g0701_0800/s0749_contain_virus/readme.md @@ -12,17 +12,17 @@ Return _the number of walls used to quarantine all the infected regions_. If the **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/01/virus11-grid.jpg) +![](virus11-grid.jpg) **Input:** isInfected = [[0,1,0,0,0,0,0,1],[0,1,0,0,0,0,0,1],[0,0,0,0,0,0,0,1],[0,0,0,0,0,0,0,0]] **Output:** 10 -**Explanation:** There are 2 contaminated regions. On the first day, add 5 walls to quarantine the viral region on the left. The board after the virus spreads is: ![](https://assets.leetcode.com/uploads/2021/06/01/virus12edited-grid.jpg) On the second day, add 5 walls to quarantine the viral region on the right. The virus is fully contained. ![](https://assets.leetcode.com/uploads/2021/06/01/virus13edited-grid.jpg) +**Explanation:** There are 2 contaminated regions. On the first day, add 5 walls to quarantine the viral region on the left. The board after the virus spreads is: ![](virus12edited-grid.jpg) On the second day, add 5 walls to quarantine the viral region on the right. The virus is fully contained. ![](virus13edited-grid.jpg) **Example 2:** -![](https://assets.leetcode.com/uploads/2021/06/01/virus2-grid.jpg) +![](virus2-grid.jpg) **Input:** isInfected = [[1,1,1],[1,0,1],[1,1,1]] diff --git a/src/main/java/g0701_0800/s0749_contain_virus/virus11-grid.jpg b/src/main/java/g0701_0800/s0749_contain_virus/virus11-grid.jpg new file mode 100644 index 000000000..c6d1e707d Binary files /dev/null and b/src/main/java/g0701_0800/s0749_contain_virus/virus11-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0749_contain_virus/virus12edited-grid.jpg b/src/main/java/g0701_0800/s0749_contain_virus/virus12edited-grid.jpg new file mode 100644 index 000000000..bf9bd25e4 Binary files /dev/null and b/src/main/java/g0701_0800/s0749_contain_virus/virus12edited-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0749_contain_virus/virus13edited-grid.jpg b/src/main/java/g0701_0800/s0749_contain_virus/virus13edited-grid.jpg new file mode 100644 index 000000000..ae139b4ce Binary files /dev/null and b/src/main/java/g0701_0800/s0749_contain_virus/virus13edited-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0749_contain_virus/virus2-grid.jpg b/src/main/java/g0701_0800/s0749_contain_virus/virus2-grid.jpg new file mode 100644 index 000000000..ea56beb06 Binary files /dev/null and b/src/main/java/g0701_0800/s0749_contain_virus/virus2-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/pyramid1-grid.jpg b/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/pyramid1-grid.jpg new file mode 100644 index 000000000..35b2e4d12 Binary files /dev/null and b/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/pyramid1-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/pyramid2-grid.jpg b/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/pyramid2-grid.jpg new file mode 100644 index 000000000..613df0f78 Binary files /dev/null and b/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/pyramid2-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/readme.md b/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/readme.md index 415ad5471..d0558529c 100644 --- a/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/readme.md +++ b/src/main/java/g0701_0800/s0756_pyramid_transition_matrix/readme.md @@ -14,7 +14,7 @@ Given `bottom` and `allowed`, return `true` _if you can build the pyramid all th **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/26/pyramid1-grid.jpg) +![](pyramid1-grid.jpg) **Input:** bottom = "BCD", allowed = ["BCC","CDE","CEA","FFF"] @@ -24,7 +24,7 @@ Given `bottom` and `allowed`, return `true` _if you can build the pyramid all th **Example 2:** -![](https://assets.leetcode.com/uploads/2021/08/26/pyramid2-grid.jpg) +![](pyramid2-grid.jpg) **Input:** bottom = "AAAA", allowed = ["AAB","AAC","BCD","BBE","DEF"] diff --git a/src/main/java/g0701_0800/s0764_largest_plus_sign/plus1-grid.jpg b/src/main/java/g0701_0800/s0764_largest_plus_sign/plus1-grid.jpg new file mode 100644 index 000000000..af33484e7 Binary files /dev/null and b/src/main/java/g0701_0800/s0764_largest_plus_sign/plus1-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0764_largest_plus_sign/plus2-grid.jpg b/src/main/java/g0701_0800/s0764_largest_plus_sign/plus2-grid.jpg new file mode 100644 index 000000000..7d63b9ac4 Binary files /dev/null and b/src/main/java/g0701_0800/s0764_largest_plus_sign/plus2-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0764_largest_plus_sign/readme.md b/src/main/java/g0701_0800/s0764_largest_plus_sign/readme.md index 68191888f..35ab47d9e 100644 --- a/src/main/java/g0701_0800/s0764_largest_plus_sign/readme.md +++ b/src/main/java/g0701_0800/s0764_largest_plus_sign/readme.md @@ -10,7 +10,7 @@ An **axis-aligned plus sign** of `1`'s of order `k` has some center `grid[r][c] **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/13/plus1-grid.jpg) +![](plus1-grid.jpg) **Input:** n = 5, mines = [[4,2]] @@ -20,7 +20,7 @@ An **axis-aligned plus sign** of `1`'s of order `k` has some center `grid[r][c] **Example 2:** -![](https://assets.leetcode.com/uploads/2021/06/13/plus2-grid.jpg) +![](plus2-grid.jpg) **Input:** n = 1, mines = [[0,0]] diff --git a/src/main/java/g0701_0800/s0766_toeplitz_matrix/ex1.jpg b/src/main/java/g0701_0800/s0766_toeplitz_matrix/ex1.jpg new file mode 100644 index 000000000..41ec3d11f Binary files /dev/null and b/src/main/java/g0701_0800/s0766_toeplitz_matrix/ex1.jpg differ diff --git a/src/main/java/g0701_0800/s0766_toeplitz_matrix/ex2.jpg b/src/main/java/g0701_0800/s0766_toeplitz_matrix/ex2.jpg new file mode 100644 index 000000000..2f8b95e70 Binary files /dev/null and b/src/main/java/g0701_0800/s0766_toeplitz_matrix/ex2.jpg differ diff --git a/src/main/java/g0701_0800/s0766_toeplitz_matrix/readme.md b/src/main/java/g0701_0800/s0766_toeplitz_matrix/readme.md index bed020597..853b68370 100644 --- a/src/main/java/g0701_0800/s0766_toeplitz_matrix/readme.md +++ b/src/main/java/g0701_0800/s0766_toeplitz_matrix/readme.md @@ -8,7 +8,7 @@ A matrix is **Toeplitz** if every diagonal from top-left to bottom-right has the **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/04/ex1.jpg) +![](ex1.jpg) **Input:** matrix = [[1,2,3,4],[5,1,2,3],[9,5,1,2]] @@ -18,7 +18,7 @@ A matrix is **Toeplitz** if every diagonal from top-left to bottom-right has the **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/04/ex2.jpg) +![](ex2.jpg) **Input:** matrix = [[1,2],[2,2]] diff --git a/src/main/java/g0701_0800/s0773_sliding_puzzle/readme.md b/src/main/java/g0701_0800/s0773_sliding_puzzle/readme.md index d1bba7983..ea2b44829 100644 --- a/src/main/java/g0701_0800/s0773_sliding_puzzle/readme.md +++ b/src/main/java/g0701_0800/s0773_sliding_puzzle/readme.md @@ -10,7 +10,7 @@ Given the puzzle board `board`, return _the least number of moves required so th **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/29/slide1-grid.jpg) +![](slide1-grid.jpg) **Input:** board = [[1,2,3],[4,0,5]] @@ -20,7 +20,7 @@ Given the puzzle board `board`, return _the least number of moves required so th **Example 2:** -![](https://assets.leetcode.com/uploads/2021/06/29/slide2-grid.jpg) +![](slide2-grid.jpg) **Input:** board = [[1,2,3],[5,4,0]] @@ -30,7 +30,7 @@ Given the puzzle board `board`, return _the least number of moves required so th **Example 3:** -![](https://assets.leetcode.com/uploads/2021/06/29/slide3-grid.jpg) +![](slide3-grid.jpg) **Input:** board = [[4,1,2],[5,0,3]] diff --git a/src/main/java/g0701_0800/s0773_sliding_puzzle/slide1-grid.jpg b/src/main/java/g0701_0800/s0773_sliding_puzzle/slide1-grid.jpg new file mode 100644 index 000000000..9bffca227 Binary files /dev/null and b/src/main/java/g0701_0800/s0773_sliding_puzzle/slide1-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0773_sliding_puzzle/slide2-grid.jpg b/src/main/java/g0701_0800/s0773_sliding_puzzle/slide2-grid.jpg new file mode 100644 index 000000000..93f8a7efa Binary files /dev/null and b/src/main/java/g0701_0800/s0773_sliding_puzzle/slide2-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0773_sliding_puzzle/slide3-grid.jpg b/src/main/java/g0701_0800/s0773_sliding_puzzle/slide3-grid.jpg new file mode 100644 index 000000000..c28f9c91e Binary files /dev/null and b/src/main/java/g0701_0800/s0773_sliding_puzzle/slide3-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0778_swim_in_rising_water/readme.md b/src/main/java/g0701_0800/s0778_swim_in_rising_water/readme.md index d9bb17b12..17bf614dc 100644 --- a/src/main/java/g0701_0800/s0778_swim_in_rising_water/readme.md +++ b/src/main/java/g0701_0800/s0778_swim_in_rising_water/readme.md @@ -10,7 +10,7 @@ Return _the least time until you can reach the bottom right square_ `(n - 1, n - **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/29/swim1-grid.jpg) +![](swim1-grid.jpg) **Input:** grid = [[0,2],[1,3]] @@ -25,7 +25,7 @@ Return _the least time until you can reach the bottom right square_ `(n - 1, n - **Example 2:** -![](https://assets.leetcode.com/uploads/2021/06/29/swim2-grid-1.jpg) +![](swim2-grid-1.jpg) **Input:** grid = [[0,1,2,3,4],[24,23,22,21,5],[12,13,14,15,16],[11,17,18,19,20],[10,9,8,7,6]] diff --git a/src/main/java/g0701_0800/s0778_swim_in_rising_water/swim1-grid.jpg b/src/main/java/g0701_0800/s0778_swim_in_rising_water/swim1-grid.jpg new file mode 100644 index 000000000..062429fc0 Binary files /dev/null and b/src/main/java/g0701_0800/s0778_swim_in_rising_water/swim1-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0778_swim_in_rising_water/swim2-grid-1.jpg b/src/main/java/g0701_0800/s0778_swim_in_rising_water/swim2-grid-1.jpg new file mode 100644 index 000000000..c9127d764 Binary files /dev/null and b/src/main/java/g0701_0800/s0778_swim_in_rising_water/swim2-grid-1.jpg differ diff --git a/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard1-grid.jpg b/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard1-grid.jpg new file mode 100644 index 000000000..eeb419c69 Binary files /dev/null and b/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard1-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard2-grid.jpg b/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard2-grid.jpg new file mode 100644 index 000000000..49768e812 Binary files /dev/null and b/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard2-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard3-grid.jpg b/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard3-grid.jpg new file mode 100644 index 000000000..009f0b02b Binary files /dev/null and b/src/main/java/g0701_0800/s0782_transform_to_chessboard/chessboard3-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0782_transform_to_chessboard/readme.md b/src/main/java/g0701_0800/s0782_transform_to_chessboard/readme.md index ad7387dce..a7fe76a86 100644 --- a/src/main/java/g0701_0800/s0782_transform_to_chessboard/readme.md +++ b/src/main/java/g0701_0800/s0782_transform_to_chessboard/readme.md @@ -10,7 +10,7 @@ A **chessboard board** is a board where no `0`'s and no `1`'s are 4-directionall **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/29/chessboard1-grid.jpg) +![](chessboard1-grid.jpg) **Input:** board = [[0,1,1,0],[0,1,1,0],[1,0,0,1],[1,0,0,1]] @@ -24,7 +24,7 @@ A **chessboard board** is a board where no `0`'s and no `1`'s are 4-directionall **Example 2:** -![](https://assets.leetcode.com/uploads/2021/06/29/chessboard2-grid.jpg) +![](chessboard2-grid.jpg) **Input:** board = [[0,1],[1,0]] @@ -34,7 +34,7 @@ A **chessboard board** is a board where no `0`'s and no `1`'s are 4-directionall **Example 3:** -![](https://assets.leetcode.com/uploads/2021/06/29/chessboard3-grid.jpg) +![](chessboard3-grid.jpg) **Input:** board = [[1,0],[1,0]] diff --git a/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/bst1.jpg b/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/bst1.jpg new file mode 100644 index 000000000..172130eb2 Binary files /dev/null and b/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/bst1.jpg differ diff --git a/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/bst2.jpg b/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/bst2.jpg new file mode 100644 index 000000000..34c3ae713 Binary files /dev/null and b/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/bst2.jpg differ diff --git a/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/readme.md b/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/readme.md index 3b7bddb56..2ee88f10e 100644 --- a/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/readme.md +++ b/src/main/java/g0701_0800/s0783_minimum_distance_between_bst_nodes/readme.md @@ -6,7 +6,7 @@ Given the `root` of a Binary Search Tree (BST), return _the minimum difference b **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/05/bst1.jpg) +![](bst1.jpg) **Input:** root = [4,2,6,1,3] @@ -14,7 +14,7 @@ Given the `root` of a Binary Search Tree (BST), return _the minimum difference b **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/05/bst2.jpg) +![](bst2.jpg) **Input:** root = [1,0,48,null,null,12,49] diff --git a/src/main/java/g0701_0800/s0785_is_graph_bipartite/bi1.jpg b/src/main/java/g0701_0800/s0785_is_graph_bipartite/bi1.jpg new file mode 100644 index 000000000..b51a95044 Binary files /dev/null and b/src/main/java/g0701_0800/s0785_is_graph_bipartite/bi1.jpg differ diff --git a/src/main/java/g0701_0800/s0785_is_graph_bipartite/bi2.jpg b/src/main/java/g0701_0800/s0785_is_graph_bipartite/bi2.jpg new file mode 100644 index 000000000..99f2bce3a Binary files /dev/null and b/src/main/java/g0701_0800/s0785_is_graph_bipartite/bi2.jpg differ diff --git a/src/main/java/g0701_0800/s0785_is_graph_bipartite/readme.md b/src/main/java/g0701_0800/s0785_is_graph_bipartite/readme.md index c73d3cef6..a1e9d3c48 100644 --- a/src/main/java/g0701_0800/s0785_is_graph_bipartite/readme.md +++ b/src/main/java/g0701_0800/s0785_is_graph_bipartite/readme.md @@ -15,7 +15,7 @@ Return `true` _if and only if it is **bipartite**_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/21/bi2.jpg) +![](bi2.jpg) **Input:** graph = [[1,2,3],[0,2],[0,1,3],[0,2]] @@ -25,7 +25,7 @@ Return `true` _if and only if it is **bipartite**_. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/21/bi1.jpg) +![](bi1.jpg) **Input:** graph = [[1,3],[0,2],[1,3],[0,2]] diff --git a/src/main/java/g0701_0800/s0787_cheapest_flights_within_k_stops/995.png b/src/main/java/g0701_0800/s0787_cheapest_flights_within_k_stops/995.png new file mode 100644 index 000000000..31b265f2e Binary files /dev/null and b/src/main/java/g0701_0800/s0787_cheapest_flights_within_k_stops/995.png differ diff --git a/src/main/java/g0701_0800/s0787_cheapest_flights_within_k_stops/readme.md b/src/main/java/g0701_0800/s0787_cheapest_flights_within_k_stops/readme.md index ca5177bda..b87094952 100644 --- a/src/main/java/g0701_0800/s0787_cheapest_flights_within_k_stops/readme.md +++ b/src/main/java/g0701_0800/s0787_cheapest_flights_within_k_stops/readme.md @@ -8,7 +8,7 @@ You are also given three integers `src`, `dst`, and `k`, return _**the cheapest **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/02/16/995.png) +![](995.png) **Input:** n = 3, flights = [[0,1,100],[1,2,100],[0,2,500]], src = 0, dst = 2, k = 1 @@ -22,7 +22,7 @@ The cheapest price from city `0` to city `2` with at most 1 stop costs 200, as m **Example 2:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/02/16/995.png) +![](995.png) **Input:** n = 3, flights = [[0,1,100],[1,2,100],[0,2,500]], src = 0, dst = 2, k = 0 diff --git a/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/lc-domino.jpg b/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/lc-domino.jpg new file mode 100644 index 000000000..47f0c8f6f Binary files /dev/null and b/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/lc-domino.jpg differ diff --git a/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/lc-domino1.jpg b/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/lc-domino1.jpg new file mode 100644 index 000000000..cc86faf3d Binary files /dev/null and b/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/lc-domino1.jpg differ diff --git a/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/readme.md b/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/readme.md index 0e6de6c40..da44c85f1 100644 --- a/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/readme.md +++ b/src/main/java/g0701_0800/s0790_domino_and_tromino_tiling/readme.md @@ -4,7 +4,7 @@ Medium You have two types of tiles: a `2 x 1` domino shape and a tromino shape. You may rotate these shapes. -![](https://assets.leetcode.com/uploads/2021/07/15/lc-domino.jpg) +![](lc-domino.jpg) Given an integer n, return _the number of ways to tile an_ `2 x n` _board_. Since the answer may be very large, return it **modulo** 109 + 7. @@ -12,7 +12,7 @@ In a tiling, every square must be covered by a tile. Two tilings are different i **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/15/lc-domino1.jpg) +![](lc-domino1.jpg) **Input:** n = 3 diff --git a/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/readme.md b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/readme.md index aecc0fe0d..3c053b0ff 100644 --- a/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/readme.md +++ b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/readme.md @@ -17,7 +17,7 @@ Here are the rules of Tic-Tac-Toe: **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/15/tictactoe1-grid.jpg) +![](tictactoe1-grid.jpg) **Input:** board = ["O "," "," "] @@ -27,7 +27,7 @@ Here are the rules of Tic-Tac-Toe: **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/15/tictactoe2-grid.jpg) +![](tictactoe2-grid.jpg) **Input:** board = ["XOX"," X "," "] @@ -37,7 +37,7 @@ Here are the rules of Tic-Tac-Toe: **Example 3:** -![](https://assets.leetcode.com/uploads/2021/05/15/tictactoe4-grid.jpg) +![](tictactoe4-grid.jpg) **Input:** board = ["XOX","O O","XOX"] diff --git a/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe1-grid.jpg b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe1-grid.jpg new file mode 100644 index 000000000..abe12ce81 Binary files /dev/null and b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe1-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe2-grid.jpg b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe2-grid.jpg new file mode 100644 index 000000000..b83663981 Binary files /dev/null and b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe2-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe4-grid.jpg b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe4-grid.jpg new file mode 100644 index 000000000..f166c34c0 Binary files /dev/null and b/src/main/java/g0701_0800/s0794_valid_tic_tac_toe_state/tictactoe4-grid.jpg differ diff --git a/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/all_1.jpg b/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/all_1.jpg new file mode 100644 index 000000000..5c01a249d Binary files /dev/null and b/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/all_1.jpg differ diff --git a/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/all_2.jpg b/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/all_2.jpg new file mode 100644 index 000000000..d9cabcdaa Binary files /dev/null and b/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/all_2.jpg differ diff --git a/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/readme.md b/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/readme.md index 57afe9133..04f4e05f2 100644 --- a/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/readme.md +++ b/src/main/java/g0701_0800/s0797_all_paths_from_source_to_target/readme.md @@ -8,7 +8,7 @@ The graph is given as follows: `graph[i]` is a list of all nodes you can visit f **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/28/all_1.jpg) +![](all_1.jpg) **Input:** graph = [[1,2],[3],[3],[]] @@ -18,7 +18,7 @@ The graph is given as follows: `graph[i]` is a list of all nodes you can visit f **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/28/all_2.jpg) +![](all_2.jpg) **Input:** graph = [[4,3,1],[3,2,4],[3],[4],[]] diff --git a/src/main/java/g0701_0800/s0799_champagne_tower/readme.md b/src/main/java/g0701_0800/s0799_champagne_tower/readme.md index 7fab7d01b..f395bbca8 100644 --- a/src/main/java/g0701_0800/s0799_champagne_tower/readme.md +++ b/src/main/java/g0701_0800/s0799_champagne_tower/readme.md @@ -8,7 +8,7 @@ Then, some champagne is poured into the first glass at the top. When the topmost For example, after one cup of champagne is poured, the top most glass is full. After two cups of champagne are poured, the two glasses on the second row are half full. After three cups of champagne are poured, those two cups become full - there are 3 full glasses total now. After four cups of champagne are poured, the third row has the middle glass half full, and the two outside glasses are a quarter full, as pictured below. -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/03/09/tower.png) +![](tower.png) Now after pouring some non-negative integer cups of champagne, return how full the jth glass in the ith row is (both `i` and `j` are 0-indexed.) diff --git a/src/main/java/g0701_0800/s0799_champagne_tower/tower.png b/src/main/java/g0701_0800/s0799_champagne_tower/tower.png new file mode 100644 index 000000000..aa11d2304 Binary files /dev/null and b/src/main/java/g0701_0800/s0799_champagne_tower/tower.png differ diff --git a/src/main/java/g0801_0900/s0802_find_eventual_safe_states/picture1.png b/src/main/java/g0801_0900/s0802_find_eventual_safe_states/picture1.png new file mode 100644 index 000000000..fb1f30cea Binary files /dev/null and b/src/main/java/g0801_0900/s0802_find_eventual_safe_states/picture1.png differ diff --git a/src/main/java/g0801_0900/s0802_find_eventual_safe_states/readme.md b/src/main/java/g0801_0900/s0802_find_eventual_safe_states/readme.md index 5d14bcf4d..45242ad76 100644 --- a/src/main/java/g0801_0900/s0802_find_eventual_safe_states/readme.md +++ b/src/main/java/g0801_0900/s0802_find_eventual_safe_states/readme.md @@ -10,7 +10,7 @@ Return _an array containing all the **safe nodes** of the graph_. The answer sho **Example 1:** -![Illustration of graph](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/03/17/picture1.png) +![Illustration of graph](picture1.png) **Input:** graph = [[1,2],[2,3],[5],[0],[5],[],[]] diff --git a/src/main/java/g0801_0900/s0807_max_increase_to_keep_city_skyline/807-ex1.png b/src/main/java/g0801_0900/s0807_max_increase_to_keep_city_skyline/807-ex1.png new file mode 100644 index 000000000..b975c1f6a Binary files /dev/null and b/src/main/java/g0801_0900/s0807_max_increase_to_keep_city_skyline/807-ex1.png differ diff --git a/src/main/java/g0801_0900/s0807_max_increase_to_keep_city_skyline/readme.md b/src/main/java/g0801_0900/s0807_max_increase_to_keep_city_skyline/readme.md index 3ebf7d033..78c4e97d7 100644 --- a/src/main/java/g0801_0900/s0807_max_increase_to_keep_city_skyline/readme.md +++ b/src/main/java/g0801_0900/s0807_max_increase_to_keep_city_skyline/readme.md @@ -12,7 +12,7 @@ Return _the **maximum total sum** that the height of the buildings can be increa **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/21/807-ex1.png) +![](807-ex1.png) **Input:** grid = [[3,0,8,4],[2,4,5,7],[9,2,6,3],[0,3,1,0]] diff --git a/src/main/java/g0801_0900/s0812_largest_triangle_area/1027.png b/src/main/java/g0801_0900/s0812_largest_triangle_area/1027.png new file mode 100644 index 000000000..611d67dd9 Binary files /dev/null and b/src/main/java/g0801_0900/s0812_largest_triangle_area/1027.png differ diff --git a/src/main/java/g0801_0900/s0812_largest_triangle_area/readme.md b/src/main/java/g0801_0900/s0812_largest_triangle_area/readme.md index 3ab1d7f1a..80ac3df40 100644 --- a/src/main/java/g0801_0900/s0812_largest_triangle_area/readme.md +++ b/src/main/java/g0801_0900/s0812_largest_triangle_area/readme.md @@ -6,7 +6,7 @@ Given an array of points on the **X-Y** plane `points` where points[i] = [ **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/04/1027.png) +![](1027.png) **Input:** points = [[0,0],[0,1],[1,0],[0,2],[2,0]] diff --git a/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028.png b/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028.png new file mode 100644 index 000000000..24fa7c21d Binary files /dev/null and b/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028.png differ diff --git a/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028_1.png b/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028_1.png new file mode 100644 index 000000000..848fdf786 Binary files /dev/null and b/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028_1.png differ diff --git a/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028_2.png b/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028_2.png new file mode 100644 index 000000000..c4cf1ac07 Binary files /dev/null and b/src/main/java/g0801_0900/s0814_binary_tree_pruning/1028_2.png differ diff --git a/src/main/java/g0801_0900/s0814_binary_tree_pruning/readme.md b/src/main/java/g0801_0900/s0814_binary_tree_pruning/readme.md index cad758a96..499d9ae0f 100644 --- a/src/main/java/g0801_0900/s0814_binary_tree_pruning/readme.md +++ b/src/main/java/g0801_0900/s0814_binary_tree_pruning/readme.md @@ -8,7 +8,7 @@ A subtree of a node `node` is `node` plus every node that is a descendant of `no **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/06/1028_2.png) +![](1028_2.png) **Input:** root = [1,null,0,0,1] @@ -18,7 +18,7 @@ A subtree of a node `node` is `node` plus every node that is a descendant of `no **Example 2:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/06/1028_1.png) +![](1028_1.png) **Input:** root = [1,0,1,0,0,0,1] @@ -26,7 +26,7 @@ A subtree of a node `node` is `node` plus every node that is a descendant of `no **Example 3:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/05/1028.png) +![](1028.png) **Input:** root = [1,1,0,1,1,0,1,0] diff --git a/src/main/java/g0801_0900/s0817_linked_list_components/lc-linkedlistcom1.jpg b/src/main/java/g0801_0900/s0817_linked_list_components/lc-linkedlistcom1.jpg new file mode 100644 index 000000000..8de7a6d66 Binary files /dev/null and b/src/main/java/g0801_0900/s0817_linked_list_components/lc-linkedlistcom1.jpg differ diff --git a/src/main/java/g0801_0900/s0817_linked_list_components/lc-linkedlistcom2.jpg b/src/main/java/g0801_0900/s0817_linked_list_components/lc-linkedlistcom2.jpg new file mode 100644 index 000000000..0fe7283c4 Binary files /dev/null and b/src/main/java/g0801_0900/s0817_linked_list_components/lc-linkedlistcom2.jpg differ diff --git a/src/main/java/g0801_0900/s0817_linked_list_components/readme.md b/src/main/java/g0801_0900/s0817_linked_list_components/readme.md index df0ef8ed6..5a70c38b0 100644 --- a/src/main/java/g0801_0900/s0817_linked_list_components/readme.md +++ b/src/main/java/g0801_0900/s0817_linked_list_components/readme.md @@ -8,7 +8,7 @@ Return _the number of connected components in_ `nums` _where two values are conn **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/22/lc-linkedlistcom1.jpg) +![](lc-linkedlistcom1.jpg) **Input:** head = [0,1,2,3], nums = [0,1,3] @@ -18,7 +18,7 @@ Return _the number of connected components in_ `nums` _where two values are conn **Example 2:** -![](https://assets.leetcode.com/uploads/2021/07/22/lc-linkedlistcom2.jpg) +![](lc-linkedlistcom2.jpg) **Input:** head = [0,1,2,3,4], nums = [0,3,1,4] diff --git a/src/main/java/g0801_0900/s0833_find_and_replace_in_string/833-ex1.png b/src/main/java/g0801_0900/s0833_find_and_replace_in_string/833-ex1.png new file mode 100644 index 000000000..986a9a7f6 Binary files /dev/null and b/src/main/java/g0801_0900/s0833_find_and_replace_in_string/833-ex1.png differ diff --git a/src/main/java/g0801_0900/s0833_find_and_replace_in_string/833-ex2-1.png b/src/main/java/g0801_0900/s0833_find_and_replace_in_string/833-ex2-1.png new file mode 100644 index 000000000..7eda6ca23 Binary files /dev/null and b/src/main/java/g0801_0900/s0833_find_and_replace_in_string/833-ex2-1.png differ diff --git a/src/main/java/g0801_0900/s0833_find_and_replace_in_string/readme.md b/src/main/java/g0801_0900/s0833_find_and_replace_in_string/readme.md index 4b27603a7..6ea770544 100644 --- a/src/main/java/g0801_0900/s0833_find_and_replace_in_string/readme.md +++ b/src/main/java/g0801_0900/s0833_find_and_replace_in_string/readme.md @@ -22,7 +22,7 @@ A **substring** is a contiguous sequence of characters in a string. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/12/833-ex1.png) +![](833-ex1.png) **Input:** s = "abcd", indices = [0, 2], sources = ["a", "cd"], targets = ["eee", "ffff"] @@ -32,7 +32,7 @@ A **substring** is a contiguous sequence of characters in a string. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/06/12/833-ex2-1.png) +![](833-ex2-1.png) **Input:** s = "abcd", indices = [0, 2], sources = ["ab","ec"], targets = ["eee","ffff"] diff --git a/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist1.jpg b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist1.jpg new file mode 100644 index 000000000..f375fc7ac Binary files /dev/null and b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist1.jpg differ diff --git a/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist2.jpg b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist2.jpg new file mode 100644 index 000000000..14d562976 Binary files /dev/null and b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist2.jpg differ diff --git a/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist3.jpg b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist3.jpg new file mode 100644 index 000000000..cd6b37e20 Binary files /dev/null and b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/lc-sumdist3.jpg differ diff --git a/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/readme.md b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/readme.md index 45b34ad9a..c402b20ef 100644 --- a/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/readme.md +++ b/src/main/java/g0801_0900/s0834_sum_of_distances_in_tree/readme.md @@ -10,7 +10,7 @@ Return an array `answer` of length `n` where `answer[i]` is the sum of the dista **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-sumdist1.jpg) +![](lc-sumdist1.jpg) **Input:** n = 6, edges = [[0,1],[0,2],[2,3],[2,4],[2,5]] @@ -24,7 +24,7 @@ Hence, answer[0] = 8, and so on. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-sumdist2.jpg) +![](lc-sumdist2.jpg) **Input:** n = 1, edges = [] @@ -32,7 +32,7 @@ Hence, answer[0] = 8, and so on. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-sumdist3.jpg) +![](lc-sumdist3.jpg) **Input:** n = 2, edges = [[1,0]] diff --git a/src/main/java/g0801_0900/s0835_image_overlap/overlap1.jpg b/src/main/java/g0801_0900/s0835_image_overlap/overlap1.jpg new file mode 100644 index 000000000..8818fc609 Binary files /dev/null and b/src/main/java/g0801_0900/s0835_image_overlap/overlap1.jpg differ diff --git a/src/main/java/g0801_0900/s0835_image_overlap/overlap_step1.jpg b/src/main/java/g0801_0900/s0835_image_overlap/overlap_step1.jpg new file mode 100644 index 000000000..0bf17f5b1 Binary files /dev/null and b/src/main/java/g0801_0900/s0835_image_overlap/overlap_step1.jpg differ diff --git a/src/main/java/g0801_0900/s0835_image_overlap/overlap_step2.jpg b/src/main/java/g0801_0900/s0835_image_overlap/overlap_step2.jpg new file mode 100644 index 000000000..7eb7dac9c Binary files /dev/null and b/src/main/java/g0801_0900/s0835_image_overlap/overlap_step2.jpg differ diff --git a/src/main/java/g0801_0900/s0835_image_overlap/readme.md b/src/main/java/g0801_0900/s0835_image_overlap/readme.md index 48950c0cf..23467f5d4 100644 --- a/src/main/java/g0801_0900/s0835_image_overlap/readme.md +++ b/src/main/java/g0801_0900/s0835_image_overlap/readme.md @@ -12,13 +12,13 @@ Return _the largest possible overlap_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/09/overlap1.jpg) +![](overlap1.jpg) **Input:** img1 = [[1,1,0],[0,1,0],[0,1,0]], img2 = [[0,0,0],[0,1,1],[0,0,1]] **Output:** 3 -**Explanation:** We translate img1 to right by 1 unit and down by 1 unit. ![](https://assets.leetcode.com/uploads/2020/09/09/overlap_step1.jpg) The number of positions that have a 1 in both images is 3 (shown in red). ![](https://assets.leetcode.com/uploads/2020/09/09/overlap_step2.jpg) +**Explanation:** We translate img1 to right by 1 unit and down by 1 unit. ![](overlap_step1.jpg) The number of positions that have a 1 in both images is 3 (shown in red). ![](overlap_step2.jpg) **Example 2:** diff --git a/src/main/java/g0801_0900/s0838_push_dominoes/domino.png b/src/main/java/g0801_0900/s0838_push_dominoes/domino.png new file mode 100644 index 000000000..78e3a36b0 Binary files /dev/null and b/src/main/java/g0801_0900/s0838_push_dominoes/domino.png differ diff --git a/src/main/java/g0801_0900/s0838_push_dominoes/readme.md b/src/main/java/g0801_0900/s0838_push_dominoes/readme.md index d47cc9e22..c6caf0b71 100644 --- a/src/main/java/g0801_0900/s0838_push_dominoes/readme.md +++ b/src/main/java/g0801_0900/s0838_push_dominoes/readme.md @@ -28,7 +28,7 @@ Return _a string representing the final state_. **Example 2:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/05/18/domino.png) +![](domino.png) **Input:** dominoes = ".L.R...LR..L.." diff --git a/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_invalid.jpg b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_invalid.jpg new file mode 100644 index 000000000..731f041c0 Binary files /dev/null and b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_invalid.jpg differ diff --git a/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_main.jpg b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_main.jpg new file mode 100644 index 000000000..c55410923 Binary files /dev/null and b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_main.jpg differ diff --git a/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_valid.jpg b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_valid.jpg new file mode 100644 index 000000000..2d1a05bb6 Binary files /dev/null and b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/magic_valid.jpg differ diff --git a/src/main/java/g0801_0900/s0840_magic_squares_in_grid/readme.md b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/readme.md index 90ef25cae..5497be430 100644 --- a/src/main/java/g0801_0900/s0840_magic_squares_in_grid/readme.md +++ b/src/main/java/g0801_0900/s0840_magic_squares_in_grid/readme.md @@ -8,13 +8,13 @@ Given a `row x col` `grid` of integers, how many `3 x 3` "magic square" subgrids **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/11/magic_main.jpg) +![](magic_main.jpg) **Input:** grid = [[4,3,8,4],[9,5,1,9],[2,7,6,2]] **Output:** 1 -**Explanation:** The following subgrid is a 3 x 3 magic square: ![](https://assets.leetcode.com/uploads/2020/09/11/magic_valid.jpg) while this one is not: ![](https://assets.leetcode.com/uploads/2020/09/11/magic_invalid.jpg) In total, there is only one magic square inside the given grid. +**Explanation:** The following subgrid is a 3 x 3 magic square: ![](magic_valid.jpg) while this one is not: ![](magic_invalid.jpg) In total, there is only one magic square inside the given grid. **Example 2:** diff --git a/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/readme.md b/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/readme.md index f6483a788..da6e077ba 100644 --- a/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/readme.md +++ b/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/readme.md @@ -8,7 +8,7 @@ Return _the length of the shortest path that visits every node_. You may start a **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/12/shortest1-graph.jpg) +![](shortest1-graph.jpg) **Input:** graph = [[1,2,3],[0],[0],[0]] @@ -18,7 +18,7 @@ Return _the length of the shortest path that visits every node_. You may start a **Example 2:** -![](https://assets.leetcode.com/uploads/2021/05/12/shortest2-graph.jpg) +![](shortest2-graph.jpg) **Input:** graph = [[1],[0,2,4],[1,3,4],[2],[1,2]] diff --git a/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/shortest1-graph.jpg b/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/shortest1-graph.jpg new file mode 100644 index 000000000..913a83295 Binary files /dev/null and b/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/shortest1-graph.jpg differ diff --git a/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/shortest2-graph.jpg b/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/shortest2-graph.jpg new file mode 100644 index 000000000..6632915c1 Binary files /dev/null and b/src/main/java/g0801_0900/s0847_shortest_path_visiting_all_nodes/shortest2-graph.jpg differ diff --git a/src/main/java/g0801_0900/s0849_maximize_distance_to_closest_person/distance.jpg b/src/main/java/g0801_0900/s0849_maximize_distance_to_closest_person/distance.jpg new file mode 100644 index 000000000..0bd9c798d Binary files /dev/null and b/src/main/java/g0801_0900/s0849_maximize_distance_to_closest_person/distance.jpg differ diff --git a/src/main/java/g0801_0900/s0849_maximize_distance_to_closest_person/readme.md b/src/main/java/g0801_0900/s0849_maximize_distance_to_closest_person/readme.md index cc9d927d8..29182b782 100644 --- a/src/main/java/g0801_0900/s0849_maximize_distance_to_closest_person/readme.md +++ b/src/main/java/g0801_0900/s0849_maximize_distance_to_closest_person/readme.md @@ -12,7 +12,7 @@ Return _that maximum distance to the closest person_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/10/distance.jpg) +![](distance.jpg) **Input:** seats = [1,0,0,0,1,0,1] diff --git a/src/main/java/g0801_0900/s0850_rectangle_area_ii/readme.md b/src/main/java/g0801_0900/s0850_rectangle_area_ii/readme.md index 3b4ca7c0b..529ed2aec 100644 --- a/src/main/java/g0801_0900/s0850_rectangle_area_ii/readme.md +++ b/src/main/java/g0801_0900/s0850_rectangle_area_ii/readme.md @@ -10,7 +10,7 @@ Return _the **total area**_. Since the answer may be too large, return it **modu **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/06/06/rectangle_area_ii_pic.png) +![](rectangle_area_ii_pic.png) **Input:** rectangles = [[0,0,2,2],[1,0,2,3],[1,0,3,1]] diff --git a/src/main/java/g0801_0900/s0850_rectangle_area_ii/rectangle_area_ii_pic.png b/src/main/java/g0801_0900/s0850_rectangle_area_ii/rectangle_area_ii_pic.png new file mode 100644 index 000000000..d9d772610 Binary files /dev/null and b/src/main/java/g0801_0900/s0850_rectangle_area_ii/rectangle_area_ii_pic.png differ diff --git a/src/main/java/g0801_0900/s0858_mirror_reflection/readme.md b/src/main/java/g0801_0900/s0858_mirror_reflection/readme.md index 9a5cd7a00..0fa6609b6 100644 --- a/src/main/java/g0801_0900/s0858_mirror_reflection/readme.md +++ b/src/main/java/g0801_0900/s0858_mirror_reflection/readme.md @@ -12,7 +12,7 @@ The test cases are guaranteed so that the ray will meet a receptor eventually. **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/06/18/reflection.png) +![](reflection.png) **Input:** p = 2, q = 1 diff --git a/src/main/java/g0801_0900/s0858_mirror_reflection/reflection.png b/src/main/java/g0801_0900/s0858_mirror_reflection/reflection.png new file mode 100644 index 000000000..0b15f47aa Binary files /dev/null and b/src/main/java/g0801_0900/s0858_mirror_reflection/reflection.png differ diff --git a/src/main/java/g0801_0900/s0861_score_after_flipping_matrix/lc-toogle1.jpg b/src/main/java/g0801_0900/s0861_score_after_flipping_matrix/lc-toogle1.jpg new file mode 100644 index 000000000..ac1099bfa Binary files /dev/null and b/src/main/java/g0801_0900/s0861_score_after_flipping_matrix/lc-toogle1.jpg differ diff --git a/src/main/java/g0801_0900/s0861_score_after_flipping_matrix/readme.md b/src/main/java/g0801_0900/s0861_score_after_flipping_matrix/readme.md index 5dc04c60d..df58dd43c 100644 --- a/src/main/java/g0801_0900/s0861_score_after_flipping_matrix/readme.md +++ b/src/main/java/g0801_0900/s0861_score_after_flipping_matrix/readme.md @@ -12,7 +12,7 @@ Return _the highest possible **score** after making any number of **moves** (inc **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-toogle1.jpg) +![](lc-toogle1.jpg) **Input:** grid = [[0,0,1,1],[1,0,1,0],[1,1,0,0]] diff --git a/src/main/java/g0801_0900/s0863_all_nodes_distance_k_in_binary_tree/readme.md b/src/main/java/g0801_0900/s0863_all_nodes_distance_k_in_binary_tree/readme.md index cb7cf2850..72a7d1e83 100644 --- a/src/main/java/g0801_0900/s0863_all_nodes_distance_k_in_binary_tree/readme.md +++ b/src/main/java/g0801_0900/s0863_all_nodes_distance_k_in_binary_tree/readme.md @@ -8,7 +8,7 @@ You can return the answer in **any order**. **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/06/28/sketch0.png) +![](sketch0.png) **Input:** root = [3,5,1,6,2,0,8,null,null,7,4], target = 5, k = 2 diff --git a/src/main/java/g0801_0900/s0863_all_nodes_distance_k_in_binary_tree/sketch0.png b/src/main/java/g0801_0900/s0863_all_nodes_distance_k_in_binary_tree/sketch0.png new file mode 100644 index 000000000..b516fb3d9 Binary files /dev/null and b/src/main/java/g0801_0900/s0863_all_nodes_distance_k_in_binary_tree/sketch0.png differ diff --git a/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-key2.jpg b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-key2.jpg new file mode 100644 index 000000000..6fdcc175b Binary files /dev/null and b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-key2.jpg differ diff --git a/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-keys2.jpg b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-keys2.jpg new file mode 100644 index 000000000..cb2183a71 Binary files /dev/null and b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-keys2.jpg differ diff --git a/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-keys3.jpg b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-keys3.jpg new file mode 100644 index 000000000..9c949354e Binary files /dev/null and b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/lc-keys3.jpg differ diff --git a/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/readme.md b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/readme.md index d2bbc2262..d6b51783c 100644 --- a/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/readme.md +++ b/src/main/java/g0801_0900/s0864_shortest_path_to_get_all_keys/readme.md @@ -20,7 +20,7 @@ Return _the lowest number of moves to acquire all keys_. If it is impossible, re **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-keys2.jpg) +![](lc-keys2.jpg) **Input:** grid = ["@.a.#","###.#","b.A.B"] @@ -30,7 +30,7 @@ Return _the lowest number of moves to acquire all keys_. If it is impossible, re **Example 2:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-key2.jpg) +![](lc-key2.jpg) **Input:** grid = ["@..aA","..B#.","....b"] @@ -38,7 +38,7 @@ Return _the lowest number of moves to acquire all keys_. If it is impossible, re **Example 3:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-keys3.jpg) +![](lc-keys3.jpg) **Input:** grid = ["@Aa"] diff --git a/src/main/java/g0801_0900/s0865_smallest_subtree_with_all_the_deepest_nodes/readme.md b/src/main/java/g0801_0900/s0865_smallest_subtree_with_all_the_deepest_nodes/readme.md index 571f67516..b3a8b3b7e 100644 --- a/src/main/java/g0801_0900/s0865_smallest_subtree_with_all_the_deepest_nodes/readme.md +++ b/src/main/java/g0801_0900/s0865_smallest_subtree_with_all_the_deepest_nodes/readme.md @@ -12,7 +12,7 @@ The **subtree** of a node is a tree consisting of that node, plus the set of all **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/01/sketch1.png) +![](sketch1.png) **Input:** root = [3,5,1,6,2,0,8,null,null,7,4] diff --git a/src/main/java/g0801_0900/s0865_smallest_subtree_with_all_the_deepest_nodes/sketch1.png b/src/main/java/g0801_0900/s0865_smallest_subtree_with_all_the_deepest_nodes/sketch1.png new file mode 100644 index 000000000..7d1a945b8 Binary files /dev/null and b/src/main/java/g0801_0900/s0865_smallest_subtree_with_all_the_deepest_nodes/sketch1.png differ diff --git a/src/main/java/g0801_0900/s0867_transpose_matrix/hint_transpose.png b/src/main/java/g0801_0900/s0867_transpose_matrix/hint_transpose.png new file mode 100644 index 000000000..564a21ba9 Binary files /dev/null and b/src/main/java/g0801_0900/s0867_transpose_matrix/hint_transpose.png differ diff --git a/src/main/java/g0801_0900/s0867_transpose_matrix/readme.md b/src/main/java/g0801_0900/s0867_transpose_matrix/readme.md index 45e598399..612c8974f 100644 --- a/src/main/java/g0801_0900/s0867_transpose_matrix/readme.md +++ b/src/main/java/g0801_0900/s0867_transpose_matrix/readme.md @@ -6,7 +6,7 @@ Given a 2D integer array `matrix`, return _the **transpose** of_ `matrix`. The **transpose** of a matrix is the matrix flipped over its main diagonal, switching the matrix's row and column indices. -![](https://assets.leetcode.com/uploads/2021/02/10/hint_transpose.png) +![](hint_transpose.png) **Example 1:** diff --git a/src/main/java/g0801_0900/s0872_leaf_similar_trees/leaf-similar-1.jpg b/src/main/java/g0801_0900/s0872_leaf_similar_trees/leaf-similar-1.jpg new file mode 100644 index 000000000..cc249577f Binary files /dev/null and b/src/main/java/g0801_0900/s0872_leaf_similar_trees/leaf-similar-1.jpg differ diff --git a/src/main/java/g0801_0900/s0872_leaf_similar_trees/leaf-similar-2.jpg b/src/main/java/g0801_0900/s0872_leaf_similar_trees/leaf-similar-2.jpg new file mode 100644 index 000000000..6d1da6ea9 Binary files /dev/null and b/src/main/java/g0801_0900/s0872_leaf_similar_trees/leaf-similar-2.jpg differ diff --git a/src/main/java/g0801_0900/s0872_leaf_similar_trees/readme.md b/src/main/java/g0801_0900/s0872_leaf_similar_trees/readme.md index 2fa319ae5..d1bc4d091 100644 --- a/src/main/java/g0801_0900/s0872_leaf_similar_trees/readme.md +++ b/src/main/java/g0801_0900/s0872_leaf_similar_trees/readme.md @@ -4,7 +4,7 @@ Easy Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a **leaf value sequence**_._ -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/16/tree.png) +![](tree.png) For example, in the given tree above, the leaf value sequence is `(6, 7, 4, 9, 8)`. @@ -14,7 +14,7 @@ Return `true` if and only if the two given trees with head nodes `root1` and `ro **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/03/leaf-similar-1.jpg) +![](leaf-similar-1.jpg) **Input:** root1 = [3,5,1,6,2,9,8,null,null,7,4], root2 = [3,5,1,6,7,4,2,null,null,null,null,null,null,9,8] @@ -22,7 +22,7 @@ Return `true` if and only if the two given trees with head nodes `root1` and `ro **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/03/leaf-similar-2.jpg) +![](leaf-similar-2.jpg) **Input:** root1 = [1,2,3], root2 = [1,3,2] diff --git a/src/main/java/g0801_0900/s0872_leaf_similar_trees/tree.png b/src/main/java/g0801_0900/s0872_leaf_similar_trees/tree.png new file mode 100644 index 000000000..9298a5759 Binary files /dev/null and b/src/main/java/g0801_0900/s0872_leaf_similar_trees/tree.png differ diff --git a/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/lc-midlist1.jpg b/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/lc-midlist1.jpg new file mode 100644 index 000000000..0141c6014 Binary files /dev/null and b/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/lc-midlist1.jpg differ diff --git a/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/lc-midlist2.jpg b/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/lc-midlist2.jpg new file mode 100644 index 000000000..a30e62e4d Binary files /dev/null and b/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/lc-midlist2.jpg differ diff --git a/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/readme.md b/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/readme.md index 3d395f4ca..ef9e12267 100644 --- a/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/readme.md +++ b/src/main/java/g0801_0900/s0876_middle_of_the_linked_list/readme.md @@ -8,7 +8,7 @@ If there are two middle nodes, return **the second middle** node. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-midlist1.jpg) +![](lc-midlist1.jpg) **Input:** head = [1,2,3,4,5] @@ -18,7 +18,7 @@ If there are two middle nodes, return **the second middle** node. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/07/23/lc-midlist2.jpg) +![](lc-midlist2.jpg) **Input:** head = [1,2,3,4,5,6] diff --git a/src/main/java/g0801_0900/s0882_reachable_nodes_in_subdivided_graph/origfinal.png b/src/main/java/g0801_0900/s0882_reachable_nodes_in_subdivided_graph/origfinal.png new file mode 100644 index 000000000..64e37d449 Binary files /dev/null and b/src/main/java/g0801_0900/s0882_reachable_nodes_in_subdivided_graph/origfinal.png differ diff --git a/src/main/java/g0801_0900/s0882_reachable_nodes_in_subdivided_graph/readme.md b/src/main/java/g0801_0900/s0882_reachable_nodes_in_subdivided_graph/readme.md index 3320d3554..6a4134749 100644 --- a/src/main/java/g0801_0900/s0882_reachable_nodes_in_subdivided_graph/readme.md +++ b/src/main/java/g0801_0900/s0882_reachable_nodes_in_subdivided_graph/readme.md @@ -14,7 +14,7 @@ Given the original graph and `maxMoves`, return _the number of nodes that are ** **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/08/01/origfinal.png) +![](origfinal.png) **Input:** edges = [[0,1,10],[0,2,1],[1,2,2]], maxMoves = 6, n = 3 diff --git a/src/main/java/g0801_0900/s0883_projection_area_of_3d_shapes/readme.md b/src/main/java/g0801_0900/s0883_projection_area_of_3d_shapes/readme.md index 7fc8eb45e..67cda0a37 100644 --- a/src/main/java/g0801_0900/s0883_projection_area_of_3d_shapes/readme.md +++ b/src/main/java/g0801_0900/s0883_projection_area_of_3d_shapes/readme.md @@ -14,7 +14,7 @@ Return _the total area of all three projections_. **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/08/02/shadow.png) +![](shadow.png) **Input:** grid = [[1,2],[3,4]] diff --git a/src/main/java/g0801_0900/s0883_projection_area_of_3d_shapes/shadow.png b/src/main/java/g0801_0900/s0883_projection_area_of_3d_shapes/shadow.png new file mode 100644 index 000000000..6f0c5d48e Binary files /dev/null and b/src/main/java/g0801_0900/s0883_projection_area_of_3d_shapes/shadow.png differ diff --git a/src/main/java/g0801_0900/s0885_spiral_matrix_iii/example_1.png b/src/main/java/g0801_0900/s0885_spiral_matrix_iii/example_1.png new file mode 100644 index 000000000..b7664fcf5 Binary files /dev/null and b/src/main/java/g0801_0900/s0885_spiral_matrix_iii/example_1.png differ diff --git a/src/main/java/g0801_0900/s0885_spiral_matrix_iii/example_2.png b/src/main/java/g0801_0900/s0885_spiral_matrix_iii/example_2.png new file mode 100644 index 000000000..6fbd6734d Binary files /dev/null and b/src/main/java/g0801_0900/s0885_spiral_matrix_iii/example_2.png differ diff --git a/src/main/java/g0801_0900/s0885_spiral_matrix_iii/readme.md b/src/main/java/g0801_0900/s0885_spiral_matrix_iii/readme.md index 182ca3174..565561105 100644 --- a/src/main/java/g0801_0900/s0885_spiral_matrix_iii/readme.md +++ b/src/main/java/g0801_0900/s0885_spiral_matrix_iii/readme.md @@ -10,7 +10,7 @@ Return _an array of coordinates representing the positions of the grid in the or **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/08/24/example_1.png) +![](example_1.png) **Input:** rows = 1, cols = 4, rStart = 0, cStart = 0 @@ -18,7 +18,7 @@ Return _an array of coordinates representing the positions of the grid in the or **Example 2:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/08/24/example_2.png) +![](example_2.png) **Input:** rows = 5, cols = 6, rStart = 1, cStart = 4 diff --git a/src/main/java/g0801_0900/s0889_construct_binary_tree_from_preorder_and_postorder_traversal/lc-prepost.jpg b/src/main/java/g0801_0900/s0889_construct_binary_tree_from_preorder_and_postorder_traversal/lc-prepost.jpg new file mode 100644 index 000000000..3ae97b5f8 Binary files /dev/null and b/src/main/java/g0801_0900/s0889_construct_binary_tree_from_preorder_and_postorder_traversal/lc-prepost.jpg differ diff --git a/src/main/java/g0801_0900/s0889_construct_binary_tree_from_preorder_and_postorder_traversal/readme.md b/src/main/java/g0801_0900/s0889_construct_binary_tree_from_preorder_and_postorder_traversal/readme.md index 888263e1e..3de8c4f4f 100644 --- a/src/main/java/g0801_0900/s0889_construct_binary_tree_from_preorder_and_postorder_traversal/readme.md +++ b/src/main/java/g0801_0900/s0889_construct_binary_tree_from_preorder_and_postorder_traversal/readme.md @@ -8,7 +8,7 @@ If there exist multiple answers, you can **return any** of them. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/07/24/lc-prepost.jpg) +![](lc-prepost.jpg) **Input:** preorder = [1,2,4,5,3,6,7], postorder = [4,5,2,6,7,3,1] diff --git a/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/readme.md b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/readme.md index f953dc49b..85cb2fc2f 100644 --- a/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/readme.md +++ b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/readme.md @@ -12,7 +12,7 @@ Return _the total surface area of the resulting shapes_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/08/tmp-grid2.jpg) +![](tmp-grid2.jpg) **Input:** grid = [[1,2],[3,4]] @@ -20,7 +20,7 @@ Return _the total surface area of the resulting shapes_. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/08/tmp-grid4.jpg) +![](tmp-grid4.jpg) **Input:** grid = [[1,1,1],[1,0,1],[1,1,1]] @@ -28,7 +28,7 @@ Return _the total surface area of the resulting shapes_. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/01/08/tmp-grid5.jpg) +![](tmp-grid5.jpg) **Input:** grid = [[2,2,2],[2,1,2],[2,2,2]] diff --git a/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid2.jpg b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid2.jpg new file mode 100644 index 000000000..cfcd5475e Binary files /dev/null and b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid2.jpg differ diff --git a/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid4.jpg b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid4.jpg new file mode 100644 index 000000000..d4512f0ae Binary files /dev/null and b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid4.jpg differ diff --git a/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid5.jpg b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid5.jpg new file mode 100644 index 000000000..f42ff0639 Binary files /dev/null and b/src/main/java/g0801_0900/s0892_surface_area_of_3d_shapes/tmp-grid5.jpg differ diff --git a/src/main/java/g0801_0900/s0894_all_possible_full_binary_trees/fivetrees.png b/src/main/java/g0801_0900/s0894_all_possible_full_binary_trees/fivetrees.png new file mode 100644 index 000000000..89d1fb33c Binary files /dev/null and b/src/main/java/g0801_0900/s0894_all_possible_full_binary_trees/fivetrees.png differ diff --git a/src/main/java/g0801_0900/s0894_all_possible_full_binary_trees/readme.md b/src/main/java/g0801_0900/s0894_all_possible_full_binary_trees/readme.md index 9e3651cbc..e29bdc63d 100644 --- a/src/main/java/g0801_0900/s0894_all_possible_full_binary_trees/readme.md +++ b/src/main/java/g0801_0900/s0894_all_possible_full_binary_trees/readme.md @@ -10,7 +10,7 @@ A **full binary tree** is a binary tree where each node has exactly `0` or `2` c **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/08/22/fivetrees.png) +![](fivetrees.png) **Input:** n = 7 diff --git a/src/main/java/g0801_0900/s0897_increasing_order_search_tree/ex1.jpg b/src/main/java/g0801_0900/s0897_increasing_order_search_tree/ex1.jpg new file mode 100644 index 000000000..ba1b5d2c0 Binary files /dev/null and b/src/main/java/g0801_0900/s0897_increasing_order_search_tree/ex1.jpg differ diff --git a/src/main/java/g0801_0900/s0897_increasing_order_search_tree/ex2.jpg b/src/main/java/g0801_0900/s0897_increasing_order_search_tree/ex2.jpg new file mode 100644 index 000000000..3c3918d31 Binary files /dev/null and b/src/main/java/g0801_0900/s0897_increasing_order_search_tree/ex2.jpg differ diff --git a/src/main/java/g0801_0900/s0897_increasing_order_search_tree/readme.md b/src/main/java/g0801_0900/s0897_increasing_order_search_tree/readme.md index b8b3a1a94..cf950c8d8 100644 --- a/src/main/java/g0801_0900/s0897_increasing_order_search_tree/readme.md +++ b/src/main/java/g0801_0900/s0897_increasing_order_search_tree/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary search tree, rearrange the tree in **in-order** so **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/17/ex1.jpg) +![](ex1.jpg) **Input:** root = [5,3,6,2,4,null,8,1,null,null,null,7,9] @@ -14,7 +14,7 @@ Given the `root` of a binary search tree, rearrange the tree in **in-order** so **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/17/ex2.jpg) +![](ex2.jpg) **Input:** root = [5,1,7] diff --git a/src/main/java/g0901_1000/s0909_snakes_and_ladders/readme.md b/src/main/java/g0901_1000/s0909_snakes_and_ladders/readme.md index f143794a6..a6513dd3b 100644 --- a/src/main/java/g0901_1000/s0909_snakes_and_ladders/readme.md +++ b/src/main/java/g0901_1000/s0909_snakes_and_ladders/readme.md @@ -21,7 +21,7 @@ Return _the least number of moves required to reach the square_ n2 arr[i + 1] > ... > arr[arr.length - 1]` -![](https://assets.leetcode.com/uploads/2019/10/20/hint_valid_mountain_array.png) +![](hint_valid_mountain_array.png) **Example 1:** diff --git a/src/main/java/g0901_1000/s0951_flip_equivalent_binary_trees/readme.md b/src/main/java/g0901_1000/s0951_flip_equivalent_binary_trees/readme.md index 577b87b5d..ab5464f81 100644 --- a/src/main/java/g0901_1000/s0951_flip_equivalent_binary_trees/readme.md +++ b/src/main/java/g0901_1000/s0951_flip_equivalent_binary_trees/readme.md @@ -10,7 +10,7 @@ Given the roots of two binary trees `root1` and `root2`, return `true` if the tw **Example 1:** -![Flipped Trees Diagram](https://assets.leetcode.com/uploads/2018/11/29/tree_ex.png) +![Flipped Trees Diagram](tree_ex.png) **Input:** root1 = [1,2,3,4,5,6,null,null,null,7,8], root2 = [1,3,2,null,6,4,5,null,null,null,null,8,7] diff --git a/src/main/java/g0901_1000/s0951_flip_equivalent_binary_trees/tree_ex.png b/src/main/java/g0901_1000/s0951_flip_equivalent_binary_trees/tree_ex.png new file mode 100644 index 000000000..c834f0bbf Binary files /dev/null and b/src/main/java/g0901_1000/s0951_flip_equivalent_binary_trees/tree_ex.png differ diff --git a/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex1.png b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex1.png new file mode 100644 index 000000000..259ef1e9f Binary files /dev/null and b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex1.png differ diff --git a/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex2.png b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex2.png new file mode 100644 index 000000000..947894807 Binary files /dev/null and b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex2.png differ diff --git a/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex3.png b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex3.png new file mode 100644 index 000000000..bc9678c6c Binary files /dev/null and b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/ex3.png differ diff --git a/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/readme.md b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/readme.md index 4f4dbadc1..30cb0d94a 100644 --- a/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/readme.md +++ b/src/main/java/g0901_1000/s0952_largest_component_size_by_common_factor/readme.md @@ -11,7 +11,7 @@ Return _the size of the largest connected component in the graph_. **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/01/ex1.png) +![](ex1.png) **Input:** nums = [4,6,15,35] @@ -19,7 +19,7 @@ Return _the size of the largest connected component in the graph_. **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/01/ex2.png) +![](ex2.png) **Input:** nums = [20,50,9,63] @@ -27,7 +27,7 @@ Return _the size of the largest connected component in the graph_. **Example 3:** -![](https://assets.leetcode.com/uploads/2018/12/01/ex3.png) +![](ex3.png) **Input:** nums = [2,3,6,7,4,12,21,39] diff --git a/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/complete-binary-tree-1.png b/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/complete-binary-tree-1.png new file mode 100644 index 000000000..9189e2cf9 Binary files /dev/null and b/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/complete-binary-tree-1.png differ diff --git a/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/complete-binary-tree-2.png b/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/complete-binary-tree-2.png new file mode 100644 index 000000000..9067fe328 Binary files /dev/null and b/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/complete-binary-tree-2.png differ diff --git a/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/readme.md b/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/readme.md index 7ca099e01..53b8189a2 100644 --- a/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/readme.md +++ b/src/main/java/g0901_1000/s0958_check_completeness_of_a_binary_tree/readme.md @@ -8,7 +8,7 @@ In a **[complete binary tree](http://en.wikipedia.org/wiki/Binary_tree#Types_of_ **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/15/complete-binary-tree-1.png) +![](complete-binary-tree-1.png) **Input:** root = [1,2,3,4,5,6] @@ -18,7 +18,7 @@ In a **[complete binary tree](http://en.wikipedia.org/wiki/Binary_tree#Types_of_ **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/15/complete-binary-tree-2.png) +![](complete-binary-tree-2.png) **Input:** root = [1,2,3,4,5,null,7] diff --git a/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/1.png b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/1.png new file mode 100644 index 000000000..eeed41bb0 Binary files /dev/null and b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/1.png differ diff --git a/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/2.png b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/2.png new file mode 100644 index 000000000..4bce5fb85 Binary files /dev/null and b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/2.png differ diff --git a/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/4.png b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/4.png new file mode 100644 index 000000000..278de2030 Binary files /dev/null and b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/4.png differ diff --git a/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/readme.md b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/readme.md index f5710671a..a4766b466 100644 --- a/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/readme.md +++ b/src/main/java/g0901_1000/s0959_regions_cut_by_slashes/readme.md @@ -10,7 +10,7 @@ Note that backslash characters are escaped, so a `'\'` is represented as `'\\'`. **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/15/1.png) +![](1.png) **Input:** grid = [" /","/ "] @@ -18,7 +18,7 @@ Note that backslash characters are escaped, so a `'\'` is represented as `'\\'`. **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/15/2.png) +![](2.png) **Input:** grid = [" /"," "] @@ -26,7 +26,7 @@ Note that backslash characters are escaped, so a `'\'` is represented as `'\\'`. **Example 3:** -![](https://assets.leetcode.com/uploads/2018/12/15/4.png) +![](4.png) **Input:** grid = ["/\\\\","\\\\/"] diff --git a/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/1a.png b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/1a.png new file mode 100644 index 000000000..f54541fa2 Binary files /dev/null and b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/1a.png differ diff --git a/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/2.png b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/2.png new file mode 100644 index 000000000..348ad9062 Binary files /dev/null and b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/2.png differ diff --git a/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/3.png b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/3.png new file mode 100644 index 000000000..837eecc31 Binary files /dev/null and b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/3.png differ diff --git a/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/readme.md b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/readme.md index 63709d726..017a1de3a 100644 --- a/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/readme.md +++ b/src/main/java/g0901_1000/s0963_minimum_area_rectangle_ii/readme.md @@ -10,7 +10,7 @@ Answers within 10-5 of the actual answer will be accepte **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/21/1a.png) +![](1a.png) **Input:** points = [[1,2],[2,1],[1,0],[0,1]] @@ -20,7 +20,7 @@ Answers within 10-5 of the actual answer will be accepte **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/22/2.png) +![](2.png) **Input:** points = [[0,1],[2,1],[1,1],[1,0],[2,0]] @@ -30,7 +30,7 @@ Answers within 10-5 of the actual answer will be accepte **Example 3:** -![](https://assets.leetcode.com/uploads/2018/12/22/3.png) +![](3.png) **Input:** points = [[0,3],[1,2],[3,1],[1,3],[2,1]] diff --git a/src/main/java/g0901_1000/s0965_univalued_binary_tree/readme.md b/src/main/java/g0901_1000/s0965_univalued_binary_tree/readme.md index 0a0df74c8..4aa75e9d7 100644 --- a/src/main/java/g0901_1000/s0965_univalued_binary_tree/readme.md +++ b/src/main/java/g0901_1000/s0965_univalued_binary_tree/readme.md @@ -8,7 +8,7 @@ Given the `root` of a binary tree, return `true` _if the given tree is **uni-val **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/28/unival_bst_1.png) +![](unival_bst_1.png) **Input:** root = [1,1,1,1,1,null,1] @@ -16,7 +16,7 @@ Given the `root` of a binary tree, return `true` _if the given tree is **uni-val **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/28/unival_bst_2.png) +![](unival_bst_2.png) **Input:** root = [2,2,2,5,2] diff --git a/src/main/java/g0901_1000/s0965_univalued_binary_tree/unival_bst_1.png b/src/main/java/g0901_1000/s0965_univalued_binary_tree/unival_bst_1.png new file mode 100644 index 000000000..155325f2b Binary files /dev/null and b/src/main/java/g0901_1000/s0965_univalued_binary_tree/unival_bst_1.png differ diff --git a/src/main/java/g0901_1000/s0965_univalued_binary_tree/unival_bst_2.png b/src/main/java/g0901_1000/s0965_univalued_binary_tree/unival_bst_2.png new file mode 100644 index 000000000..c7073b651 Binary files /dev/null and b/src/main/java/g0901_1000/s0965_univalued_binary_tree/unival_bst_2.png differ diff --git a/src/main/java/g0901_1000/s0968_binary_tree_cameras/bst_cameras_01.png b/src/main/java/g0901_1000/s0968_binary_tree_cameras/bst_cameras_01.png new file mode 100644 index 000000000..83acd7a1d Binary files /dev/null and b/src/main/java/g0901_1000/s0968_binary_tree_cameras/bst_cameras_01.png differ diff --git a/src/main/java/g0901_1000/s0968_binary_tree_cameras/bst_cameras_02.png b/src/main/java/g0901_1000/s0968_binary_tree_cameras/bst_cameras_02.png new file mode 100644 index 000000000..9ded3b941 Binary files /dev/null and b/src/main/java/g0901_1000/s0968_binary_tree_cameras/bst_cameras_02.png differ diff --git a/src/main/java/g0901_1000/s0968_binary_tree_cameras/readme.md b/src/main/java/g0901_1000/s0968_binary_tree_cameras/readme.md index 592390d39..8fc96e37f 100644 --- a/src/main/java/g0901_1000/s0968_binary_tree_cameras/readme.md +++ b/src/main/java/g0901_1000/s0968_binary_tree_cameras/readme.md @@ -8,7 +8,7 @@ Return _the minimum number of cameras needed to monitor all nodes of the tree_. **Example 1:** -![](https://assets.leetcode.com/uploads/2018/12/29/bst_cameras_01.png) +![](bst_cameras_01.png) **Input:** root = [0,0,null,0,0] @@ -18,7 +18,7 @@ Return _the minimum number of cameras needed to monitor all nodes of the tree_. **Example 2:** -![](https://assets.leetcode.com/uploads/2018/12/29/bst_cameras_02.png) +![](bst_cameras_02.png) **Input:** root = [0,0,null,0,null,0,null,null,0] diff --git a/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/1219-01.png b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/1219-01.png new file mode 100644 index 000000000..d04161846 Binary files /dev/null and b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/1219-01.png differ diff --git a/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/1219-02.png b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/1219-02.png new file mode 100644 index 000000000..64e1acc46 Binary files /dev/null and b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/1219-02.png differ diff --git a/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/fliptree.jpg b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/fliptree.jpg new file mode 100644 index 000000000..1376261da Binary files /dev/null and b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/fliptree.jpg differ diff --git a/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/readme.md b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/readme.md index 348d47295..cfd79d4da 100644 --- a/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/readme.md +++ b/src/main/java/g0901_1000/s0971_flip_binary_tree_to_match_preorder_traversal/readme.md @@ -6,7 +6,7 @@ You are given the `root` of a binary tree with `n` nodes, where each node is uni Any node in the binary tree can be **flipped** by swapping its left and right subtrees. For example, flipping node 1 will have the following effect: -![](https://assets.leetcode.com/uploads/2021/02/15/fliptree.jpg) +![](fliptree.jpg) Flip the **smallest** number of nodes so that the **pre-order traversal** of the tree **matches** `voyage`. @@ -14,7 +14,7 @@ Return _a list of the values of all **flipped** nodes. You may return the answer **Example 1:** -![](https://assets.leetcode.com/uploads/2019/01/02/1219-01.png) +![](1219-01.png) **Input:** root = [1,2], voyage = [2,1] @@ -24,7 +24,7 @@ Return _a list of the values of all **flipped** nodes. You may return the answer **Example 2:** -![](https://assets.leetcode.com/uploads/2019/01/02/1219-02.png) +![](1219-02.png) **Input:** root = [1,2,3], voyage = [1,3,2] @@ -34,7 +34,7 @@ Return _a list of the values of all **flipped** nodes. You may return the answer **Example 3:** -![](https://assets.leetcode.com/uploads/2019/01/02/1219-02.png) +![](1219-02.png) **Input:** root = [1,2,3], voyage = [1,2,3] diff --git a/src/main/java/g0901_1000/s0973_k_closest_points_to_origin/closestplane1.jpg b/src/main/java/g0901_1000/s0973_k_closest_points_to_origin/closestplane1.jpg new file mode 100644 index 000000000..8b816ac8c Binary files /dev/null and b/src/main/java/g0901_1000/s0973_k_closest_points_to_origin/closestplane1.jpg differ diff --git a/src/main/java/g0901_1000/s0973_k_closest_points_to_origin/readme.md b/src/main/java/g0901_1000/s0973_k_closest_points_to_origin/readme.md index 352242eb4..e8fe88b27 100644 --- a/src/main/java/g0901_1000/s0973_k_closest_points_to_origin/readme.md +++ b/src/main/java/g0901_1000/s0973_k_closest_points_to_origin/readme.md @@ -10,7 +10,7 @@ You may return the answer in **any order**. The answer is **guaranteed** to be * **Example 1:** -![](https://assets.leetcode.com/uploads/2021/03/03/closestplane1.jpg) +![](closestplane1.jpg) **Input:** points = [[1,3],[-2,2]], k = 1 diff --git a/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/readme.md b/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/readme.md index 31394dbf2..dfc34b616 100644 --- a/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/readme.md +++ b/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/readme.md @@ -10,7 +10,7 @@ Return _the **minimum** number of moves required to make every node have **exact **Example 1:** -![](https://assets.leetcode.com/uploads/2019/01/18/tree1.png) +![](tree1.png) **Input:** root = [3,0,0] @@ -20,7 +20,7 @@ Return _the **minimum** number of moves required to make every node have **exact **Example 2:** -![](https://assets.leetcode.com/uploads/2019/01/18/tree2.png) +![](tree2.png) **Input:** root = [0,3,0] diff --git a/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/tree1.png b/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/tree1.png new file mode 100644 index 000000000..b351a843e Binary files /dev/null and b/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/tree1.png differ diff --git a/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/tree2.png b/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/tree2.png new file mode 100644 index 000000000..840174598 Binary files /dev/null and b/src/main/java/g0901_1000/s0979_distribute_coins_in_binary_tree/tree2.png differ diff --git a/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique1.jpg b/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique1.jpg new file mode 100644 index 000000000..43a50e8fa Binary files /dev/null and b/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique1.jpg differ diff --git a/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique2.jpg b/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique2.jpg new file mode 100644 index 000000000..549f95086 Binary files /dev/null and b/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique2.jpg differ diff --git a/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique3-.jpg b/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique3-.jpg new file mode 100644 index 000000000..daf170a04 Binary files /dev/null and b/src/main/java/g0901_1000/s0980_unique_paths_iii/lc-unique3-.jpg differ diff --git a/src/main/java/g0901_1000/s0980_unique_paths_iii/readme.md b/src/main/java/g0901_1000/s0980_unique_paths_iii/readme.md index 530957c65..ac6ea9f3d 100644 --- a/src/main/java/g0901_1000/s0980_unique_paths_iii/readme.md +++ b/src/main/java/g0901_1000/s0980_unique_paths_iii/readme.md @@ -13,7 +13,7 @@ Return _the number of 4-directional walks from the starting square to the ending **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/02/lc-unique1.jpg) +![](lc-unique1.jpg) **Input:** grid = [[1,0,0,0],[0,0,0,0],[0,0,2,-1]] @@ -27,7 +27,7 @@ Return _the number of 4-directional walks from the starting square to the ending **Example 2:** -![](https://assets.leetcode.com/uploads/2021/08/02/lc-unique2.jpg) +![](lc-unique2.jpg) **Input:** grid = [[1,0,0,0],[0,0,0,0],[0,0,0,2]] @@ -45,7 +45,7 @@ Return _the number of 4-directional walks from the starting square to the ending **Example 3:** -![](https://assets.leetcode.com/uploads/2021/08/02/lc-unique3-.jpg) +![](lc-unique3-.jpg) **Input:** grid = [[0,1],[2,0]] diff --git a/src/main/java/g0901_1000/s0986_interval_list_intersections/interval1.png b/src/main/java/g0901_1000/s0986_interval_list_intersections/interval1.png new file mode 100644 index 000000000..72102be2e Binary files /dev/null and b/src/main/java/g0901_1000/s0986_interval_list_intersections/interval1.png differ diff --git a/src/main/java/g0901_1000/s0986_interval_list_intersections/readme.md b/src/main/java/g0901_1000/s0986_interval_list_intersections/readme.md index 5339f0455..610d4a7f6 100644 --- a/src/main/java/g0901_1000/s0986_interval_list_intersections/readme.md +++ b/src/main/java/g0901_1000/s0986_interval_list_intersections/readme.md @@ -12,7 +12,7 @@ The **intersection** of two closed intervals is a set of real numbers that are e **Example 1:** -![](https://assets.leetcode.com/uploads/2019/01/30/interval1.png) +![](interval1.png) **Input:** firstList = [[0,2],[5,10],[13,23],[24,25]], secondList = [[1,5],[8,12],[15,24],[25,26]] diff --git a/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/readme.md b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/readme.md index 21f1895b9..ebcbc2cea 100644 --- a/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/readme.md +++ b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/readme.md @@ -12,7 +12,7 @@ Return _the **vertical order traversal** of the binary tree_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/29/vtree1.jpg) +![](vtree1.jpg) **Input:** root = [3,9,20,null,null,15,7] @@ -30,7 +30,7 @@ Column 2: Only node 7 is in this column. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/29/vtree2.jpg) +![](vtree2.jpg) **Input:** root = [1,2,3,4,5,6,7] @@ -53,7 +53,7 @@ Column 2: Only node 7 is in this column. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/01/29/vtree3.jpg) +![](vtree3.jpg) **Input:** root = [1,2,3,4,6,5,7] diff --git a/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree1.jpg b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree1.jpg new file mode 100644 index 000000000..56f652a07 Binary files /dev/null and b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree1.jpg differ diff --git a/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree2.jpg b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree2.jpg new file mode 100644 index 000000000..1bb211bd0 Binary files /dev/null and b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree2.jpg differ diff --git a/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree3.jpg b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree3.jpg new file mode 100644 index 000000000..fca758d4d Binary files /dev/null and b/src/main/java/g0901_1000/s0987_vertical_order_traversal_of_a_binary_tree/vtree3.jpg differ diff --git a/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/readme.md b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/readme.md index 5e99d73ae..755b5f884 100644 --- a/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/readme.md +++ b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/readme.md @@ -14,7 +14,7 @@ A leaf of a node is a node that has no children. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/01/30/tree1.png) +![](tree1.png) **Input:** root = [0,1,2,3,4,3,4] @@ -22,7 +22,7 @@ A leaf of a node is a node that has no children. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/01/30/tree2.png) +![](tree2.png) **Input:** root = [25,1,3,1,3,0,2] @@ -30,7 +30,7 @@ A leaf of a node is a node that has no children. **Example 3:** -![](https://assets.leetcode.com/uploads/2019/02/01/tree3.png) +![](tree3.png) **Input:** root = [2,2,1,null,1,0,null,0] diff --git a/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree1.png b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree1.png new file mode 100644 index 000000000..e858b9aa8 Binary files /dev/null and b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree1.png differ diff --git a/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree2.png b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree2.png new file mode 100644 index 000000000..b38b85868 Binary files /dev/null and b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree2.png differ diff --git a/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree3.png b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree3.png new file mode 100644 index 000000000..9d621d7a3 Binary files /dev/null and b/src/main/java/g0901_1000/s0988_smallest_string_starting_from_leaf/tree3.png differ diff --git a/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-01.png b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-01.png new file mode 100644 index 000000000..5d4c50ae4 Binary files /dev/null and b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-01.png differ diff --git a/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-02.png b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-02.png new file mode 100644 index 000000000..56574fb43 Binary files /dev/null and b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-02.png differ diff --git a/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-03.png b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-03.png new file mode 100644 index 000000000..e7a7aaf62 Binary files /dev/null and b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/q1248-03.png differ diff --git a/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/readme.md b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/readme.md index 06c09128d..71f38bee8 100644 --- a/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/readme.md +++ b/src/main/java/g0901_1000/s0993_cousins_in_binary_tree/readme.md @@ -10,7 +10,7 @@ Note that in a binary tree, the root node is at the depth `0`, and children of e **Example 1:** -![](https://assets.leetcode.com/uploads/2019/02/12/q1248-01.png) +![](q1248-01.png) **Input:** root = [1,2,3,4], x = 4, y = 3 @@ -18,7 +18,7 @@ Note that in a binary tree, the root node is at the depth `0`, and children of e **Example 2:** -![](https://assets.leetcode.com/uploads/2019/02/12/q1248-02.png) +![](q1248-02.png) **Input:** root = [1,2,3,null,4,null,5], x = 5, y = 4 @@ -26,7 +26,7 @@ Note that in a binary tree, the root node is at the depth `0`, and children of e **Example 3:** -![](https://assets.leetcode.com/uploads/2019/02/13/q1248-03.png) +![](q1248-03.png) **Input:** root = [1,2,3,null,4], x = 2, y = 3 diff --git a/src/main/java/g0901_1000/s0994_rotting_oranges/oranges.png b/src/main/java/g0901_1000/s0994_rotting_oranges/oranges.png new file mode 100644 index 000000000..ce69a318d Binary files /dev/null and b/src/main/java/g0901_1000/s0994_rotting_oranges/oranges.png differ diff --git a/src/main/java/g0901_1000/s0994_rotting_oranges/readme.md b/src/main/java/g0901_1000/s0994_rotting_oranges/readme.md index 31fd49117..96587e933 100644 --- a/src/main/java/g0901_1000/s0994_rotting_oranges/readme.md +++ b/src/main/java/g0901_1000/s0994_rotting_oranges/readme.md @@ -14,7 +14,7 @@ Return _the minimum number of minutes that must elapse until no cell has a fresh **Example 1:** -![](https://assets.leetcode.com/uploads/2019/02/16/oranges.png) +![](oranges.png) **Input:** grid = [[2,1,1],[1,1,0],[0,1,1]] diff --git a/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree1.jpg b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree1.jpg new file mode 100644 index 000000000..2c1b68317 Binary files /dev/null and b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree1.jpg differ diff --git a/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree21.jpg b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree21.jpg new file mode 100644 index 000000000..c0f78e8a6 Binary files /dev/null and b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree21.jpg differ diff --git a/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree3.jpg b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree3.jpg new file mode 100644 index 000000000..d1dcf0755 Binary files /dev/null and b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/maxtree3.jpg differ diff --git a/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/readme.md b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/readme.md index e15a97a83..12fd69c08 100644 --- a/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/readme.md +++ b/src/main/java/g0901_1000/s0998_maximum_binary_tree_ii/readme.md @@ -22,7 +22,7 @@ Return `Construct(b)`. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/09/maxtree1.JPG) +![](maxtree1.jpg) **Input:** root = [4,1,3,null,null,2], val = 5 @@ -32,7 +32,7 @@ Return `Construct(b)`. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/08/09/maxtree21.JPG) +![](maxtree21.jpg) **Input:** root = [5,2,4,null,1], val = 3 @@ -42,7 +42,7 @@ Return `Construct(b)`. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/08/09/maxtree3.JPG) +![](maxtree3.jpg) **Input:** root = [5,2,3,null,1], val = 4 diff --git a/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_1_improved.png b/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_1_improved.png new file mode 100644 index 000000000..24c6e6d39 Binary files /dev/null and b/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_1_improved.png differ diff --git a/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_2_improved.png b/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_2_improved.png new file mode 100644 index 000000000..404336b54 Binary files /dev/null and b/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_2_improved.png differ diff --git a/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_3_improved.png b/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_3_improved.png new file mode 100644 index 000000000..fee9ce4ca Binary files /dev/null and b/src/main/java/g0901_1000/s0999_available_captures_for_rook/1253_example_3_improved.png differ diff --git a/src/main/java/g0901_1000/s0999_available_captures_for_rook/readme.md b/src/main/java/g0901_1000/s0999_available_captures_for_rook/readme.md index 7a9f718dc..4f8b40ae0 100644 --- a/src/main/java/g0901_1000/s0999_available_captures_for_rook/readme.md +++ b/src/main/java/g0901_1000/s0999_available_captures_for_rook/readme.md @@ -10,7 +10,7 @@ Return _the **number of available captures** for the white rook_. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/02/20/1253_example_1_improved.PNG) +![](1253_example_1_improved.png) **Input:** board = [[".",".",".",".",".",".",".","."],[".",".",".","p",".",".",".","."],[".",".",".","R",".",".",".","p"],[".",".",".",".",".",".",".","."],[".",".",".",".",".",".",".","."],[".",".",".","p",".",".",".","."],[".",".",".",".",".",".",".","."],[".",".",".",".",".",".",".","."]] @@ -20,7 +20,7 @@ Return _the **number of available captures** for the white rook_. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/02/19/1253_example_2_improved.PNG) +![](1253_example_2_improved.png) **Input:** board = [[".",".",".",".",".",".",".","."],[".","p","p","p","p","p",".","."],[".","p","p","B","p","p",".","."],[".","p","B","R","B","p",".","."],[".","p","p","B","p","p",".","."],[".","p","p","p","p","p",".","."],[".",".",".",".",".",".",".","."],[".",".",".",".",".",".",".","."]] @@ -30,7 +30,7 @@ Return _the **number of available captures** for the white rook_. **Example 3:** -![](https://assets.leetcode.com/uploads/2019/02/20/1253_example_3_improved.PNG) +![](1253_example_3_improved.png) **Input:** board = [[".",".",".",".",".",".",".","."],[".",".",".","p",".",".",".","."],[".",".",".","p",".",".",".","."],["p","p",".","R",".","p","B","."],[".",".",".",".",".",".",".","."],[".",".",".","B",".",".",".","."],[".",".",".","p",".",".",".","."],[".",".",".",".",".",".",".","."]] diff --git a/src/main/java/g1001_1100/s1001_grid_illumination/illu_1.jpg b/src/main/java/g1001_1100/s1001_grid_illumination/illu_1.jpg new file mode 100644 index 000000000..2e40c45b1 Binary files /dev/null and b/src/main/java/g1001_1100/s1001_grid_illumination/illu_1.jpg differ diff --git a/src/main/java/g1001_1100/s1001_grid_illumination/illu_step1.jpg b/src/main/java/g1001_1100/s1001_grid_illumination/illu_step1.jpg new file mode 100644 index 000000000..2e53c572b Binary files /dev/null and b/src/main/java/g1001_1100/s1001_grid_illumination/illu_step1.jpg differ diff --git a/src/main/java/g1001_1100/s1001_grid_illumination/illu_step2.jpg b/src/main/java/g1001_1100/s1001_grid_illumination/illu_step2.jpg new file mode 100644 index 000000000..333733562 Binary files /dev/null and b/src/main/java/g1001_1100/s1001_grid_illumination/illu_step2.jpg differ diff --git a/src/main/java/g1001_1100/s1001_grid_illumination/readme.md b/src/main/java/g1001_1100/s1001_grid_illumination/readme.md index 068f0b8a0..4ad77eb64 100644 --- a/src/main/java/g1001_1100/s1001_grid_illumination/readme.md +++ b/src/main/java/g1001_1100/s1001_grid_illumination/readme.md @@ -14,13 +14,13 @@ Return _an array of integers_ `ans`_,_ _where_ `ans[j]` _should be_ `1` _if the **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/19/illu_1.jpg) +![](illu_1.jpg) **Input:** n = 5, lamps = [[0,0],[4,4]], queries = [[1,1],[1,0]] **Output:** [1,0] -**Explanation:** We have the initial grid with all lamps turned off. In the above picture we see the grid after turning on the lamp at grid[0][0] then turning on the lamp at grid[4][4]. The 0th query asks if the lamp at grid[1][1] is illuminated or not (the blue square). It is illuminated, so set ans[0] = 1. Then, we turn off all lamps in the red square. ![](https://assets.leetcode.com/uploads/2020/08/19/illu_step1.jpg) The 1st query asks if the lamp at grid[1][0] is illuminated or not (the blue square). It is not illuminated, so set ans[1] = 0. Then, we turn off all lamps in the red rectangle. ![](https://assets.leetcode.com/uploads/2020/08/19/illu_step2.jpg) +**Explanation:** We have the initial grid with all lamps turned off. In the above picture we see the grid after turning on the lamp at grid[0][0] then turning on the lamp at grid[4][4]. The 0th query asks if the lamp at grid[1][1] is illuminated or not (the blue square). It is illuminated, so set ans[0] = 1. Then, we turn off all lamps in the red square. ![](illu_step1.jpg) The 1st query asks if the lamp at grid[1][0] is illuminated or not (the blue square). It is not illuminated, so set ans[1] = 0. Then, we turn off all lamps in the red rectangle. ![](illu_step2.jpg) **Example 2:** diff --git a/src/main/java/g1001_1100/s1007_minimum_domino_rotations_for_equal_row/domino.png b/src/main/java/g1001_1100/s1007_minimum_domino_rotations_for_equal_row/domino.png new file mode 100644 index 000000000..1060f1754 Binary files /dev/null and b/src/main/java/g1001_1100/s1007_minimum_domino_rotations_for_equal_row/domino.png differ diff --git a/src/main/java/g1001_1100/s1007_minimum_domino_rotations_for_equal_row/readme.md b/src/main/java/g1001_1100/s1007_minimum_domino_rotations_for_equal_row/readme.md index f96389e65..2b13b0046 100644 --- a/src/main/java/g1001_1100/s1007_minimum_domino_rotations_for_equal_row/readme.md +++ b/src/main/java/g1001_1100/s1007_minimum_domino_rotations_for_equal_row/readme.md @@ -12,7 +12,7 @@ If it cannot be done, return `-1`. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/05/14/domino.png) +![](domino.png) **Input:** tops = [2,1,2,4,2,2], bottoms = [5,2,6,2,3,2] diff --git a/src/main/java/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/1266.png b/src/main/java/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/1266.png new file mode 100644 index 000000000..3423c8333 Binary files /dev/null and b/src/main/java/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/1266.png differ diff --git a/src/main/java/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/readme.md b/src/main/java/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/readme.md index 656a04901..bc801de4e 100644 --- a/src/main/java/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/readme.md +++ b/src/main/java/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/readme.md @@ -12,7 +12,7 @@ A **preorder traversal** of a binary tree displays the value of the node first, **Example 1:** -![](https://assets.leetcode.com/uploads/2019/03/06/1266.png) +![](1266.png) **Input:** preorder = [8,5,1,7,10,12] diff --git a/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/linkedlistnext1.jpg b/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/linkedlistnext1.jpg new file mode 100644 index 000000000..a1fc7b54c Binary files /dev/null and b/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/linkedlistnext1.jpg differ diff --git a/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/linkedlistnext2.jpg b/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/linkedlistnext2.jpg new file mode 100644 index 000000000..bc0df5b73 Binary files /dev/null and b/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/linkedlistnext2.jpg differ diff --git a/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/readme.md b/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/readme.md index e8a304f63..09dded7c2 100644 --- a/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/readme.md +++ b/src/main/java/g1001_1100/s1019_next_greater_node_in_linked_list/readme.md @@ -10,7 +10,7 @@ Return an integer array `answer` where `answer[i]` is the value of the next grea **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/05/linkedlistnext1.jpg) +![](linkedlistnext1.jpg) **Input:** head = [2,1,5] @@ -18,7 +18,7 @@ Return an integer array `answer` where `answer[i]` is the value of the next grea **Example 2:** -![](https://assets.leetcode.com/uploads/2021/08/05/linkedlistnext2.jpg) +![](linkedlistnext2.jpg) **Input:** head = [2,7,4,3,5] diff --git a/src/main/java/g1001_1100/s1020_number_of_enclaves/enclaves1.jpg b/src/main/java/g1001_1100/s1020_number_of_enclaves/enclaves1.jpg new file mode 100644 index 000000000..78ee13c60 Binary files /dev/null and b/src/main/java/g1001_1100/s1020_number_of_enclaves/enclaves1.jpg differ diff --git a/src/main/java/g1001_1100/s1020_number_of_enclaves/enclaves2.jpg b/src/main/java/g1001_1100/s1020_number_of_enclaves/enclaves2.jpg new file mode 100644 index 000000000..d614aa4dc Binary files /dev/null and b/src/main/java/g1001_1100/s1020_number_of_enclaves/enclaves2.jpg differ diff --git a/src/main/java/g1001_1100/s1020_number_of_enclaves/readme.md b/src/main/java/g1001_1100/s1020_number_of_enclaves/readme.md index 5144e1d32..6b3276e19 100644 --- a/src/main/java/g1001_1100/s1020_number_of_enclaves/readme.md +++ b/src/main/java/g1001_1100/s1020_number_of_enclaves/readme.md @@ -10,7 +10,7 @@ Return _the number of land cells in_ `grid` _for which we cannot walk off the bo **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/18/enclaves1.jpg) +![](enclaves1.jpg) **Input:** grid = [[0,0,0,0],[1,0,1,0],[0,1,1,0],[0,0,0,0]] @@ -20,7 +20,7 @@ Return _the number of land cells in_ `grid` _for which we cannot walk off the bo **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/18/enclaves2.jpg) +![](enclaves2.jpg) **Input:** grid = [[0,1,1,0],[0,0,1,0],[0,0,1,0],[0,0,0,0]] diff --git a/src/main/java/g1001_1100/s1022_sum_of_root_to_leaf_binary_numbers/readme.md b/src/main/java/g1001_1100/s1022_sum_of_root_to_leaf_binary_numbers/readme.md index b005fa260..d5b85bc7f 100644 --- a/src/main/java/g1001_1100/s1022_sum_of_root_to_leaf_binary_numbers/readme.md +++ b/src/main/java/g1001_1100/s1022_sum_of_root_to_leaf_binary_numbers/readme.md @@ -12,7 +12,7 @@ The test cases are generated so that the answer fits in a **32-bits** integer. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/04/04/sum-of-root-to-leaf-binary-numbers.png) +![](sum-of-root-to-leaf-binary-numbers.png) **Input:** root = [1,0,1,0,1,0,1] diff --git a/src/main/java/g1001_1100/s1022_sum_of_root_to_leaf_binary_numbers/sum-of-root-to-leaf-binary-numbers.png b/src/main/java/g1001_1100/s1022_sum_of_root_to_leaf_binary_numbers/sum-of-root-to-leaf-binary-numbers.png new file mode 100644 index 000000000..eb175e7c6 Binary files /dev/null and b/src/main/java/g1001_1100/s1022_sum_of_root_to_leaf_binary_numbers/sum-of-root-to-leaf-binary-numbers.png differ diff --git a/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/readme.md b/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/readme.md index 63394c4d4..a650c8ebe 100644 --- a/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/readme.md +++ b/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/readme.md @@ -8,7 +8,7 @@ A node `a` is an ancestor of `b` if either: any child of `a` is equal to `b` or **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/09/tmp-tree.jpg) +![](tmp-tree.jpg) **Input:** root = [8,3,10,1,6,null,14,null,null,4,7,13] @@ -25,7 +25,7 @@ Among all possible differences, the maximum value of 7 is obtained by |8 - 1| = **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/09/tmp-tree-1.jpg) +![](tmp-tree-1.jpg) **Input:** root = [1,null,2,null,0,3] diff --git a/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/tmp-tree-1.jpg b/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/tmp-tree-1.jpg new file mode 100644 index 000000000..85104e117 Binary files /dev/null and b/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/tmp-tree-1.jpg differ diff --git a/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/tmp-tree.jpg b/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/tmp-tree.jpg new file mode 100644 index 000000000..8c1ebf4cf Binary files /dev/null and b/src/main/java/g1001_1100/s1026_maximum_difference_between_node_and_ancestor/tmp-tree.jpg differ diff --git a/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/readme.md b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/readme.md index dc32c334d..5c98a49bf 100644 --- a/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/readme.md +++ b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/readme.md @@ -12,7 +12,7 @@ Given the output `traversal` of this traversal, recover the tree and return _its **Example 1:** -![](https://assets.leetcode.com/uploads/2019/04/08/recover-a-tree-from-preorder-traversal.png) +![](recover-a-tree-from-preorder-traversal.png) **Input:** traversal = "1-2--3--4-5--6--7" @@ -20,7 +20,7 @@ Given the output `traversal` of this traversal, recover the tree and return _its **Example 2:** -![](https://assets.leetcode.com/uploads/2019/04/11/screen-shot-2019-04-10-at-114101-pm.png) +![](screen-shot-2019-04-10-at-114101-pm.png) **Input:** traversal = "1-2--3---4-5--6---7" @@ -28,7 +28,7 @@ Given the output `traversal` of this traversal, recover the tree and return _its **Example 3:** -![](https://assets.leetcode.com/uploads/2019/04/11/screen-shot-2019-04-10-at-114955-pm.png) +![](screen-shot-2019-04-10-at-114955-pm.png) **Input:** traversal = "1-401--349---90--88" diff --git a/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/recover-a-tree-from-preorder-traversal.png b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/recover-a-tree-from-preorder-traversal.png new file mode 100644 index 000000000..48d777d2c Binary files /dev/null and b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/recover-a-tree-from-preorder-traversal.png differ diff --git a/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/screen-shot-2019-04-10-at-114101-pm.png b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/screen-shot-2019-04-10-at-114101-pm.png new file mode 100644 index 000000000..ff925bad2 Binary files /dev/null and b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/screen-shot-2019-04-10-at-114101-pm.png differ diff --git a/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/screen-shot-2019-04-10-at-114955-pm.png b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/screen-shot-2019-04-10-at-114955-pm.png new file mode 100644 index 000000000..a133057e6 Binary files /dev/null and b/src/main/java/g1001_1100/s1028_recover_a_tree_from_preorder_traversal/screen-shot-2019-04-10-at-114955-pm.png differ diff --git a/src/main/java/g1001_1100/s1035_uncrossed_lines/142.png b/src/main/java/g1001_1100/s1035_uncrossed_lines/142.png new file mode 100644 index 000000000..c9f2f076e Binary files /dev/null and b/src/main/java/g1001_1100/s1035_uncrossed_lines/142.png differ diff --git a/src/main/java/g1001_1100/s1035_uncrossed_lines/readme.md b/src/main/java/g1001_1100/s1035_uncrossed_lines/readme.md index 77b8d2c6e..afedbd9fb 100644 --- a/src/main/java/g1001_1100/s1035_uncrossed_lines/readme.md +++ b/src/main/java/g1001_1100/s1035_uncrossed_lines/readme.md @@ -15,7 +15,7 @@ Return _the maximum number of connecting lines we can draw in this way_. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/04/26/142.png) +![](142.png) **Input:** nums1 = [1,4,2], nums2 = [1,2,4] diff --git a/src/main/java/g1001_1100/s1038_binary_search_tree_to_greater_sum_tree/readme.md b/src/main/java/g1001_1100/s1038_binary_search_tree_to_greater_sum_tree/readme.md index 023b49b29..351b83323 100644 --- a/src/main/java/g1001_1100/s1038_binary_search_tree_to_greater_sum_tree/readme.md +++ b/src/main/java/g1001_1100/s1038_binary_search_tree_to_greater_sum_tree/readme.md @@ -12,7 +12,7 @@ As a reminder, a _binary search tree_ is a tree that satisfies these constraints **Example 1:** -![](https://assets.leetcode.com/uploads/2019/05/02/tree.png) +![](tree.png) **Input:** root = [4,1,6,0,2,5,7,null,null,null,3,null,null,null,8] diff --git a/src/main/java/g1001_1100/s1038_binary_search_tree_to_greater_sum_tree/tree.png b/src/main/java/g1001_1100/s1038_binary_search_tree_to_greater_sum_tree/tree.png new file mode 100644 index 000000000..fb2cfb543 Binary files /dev/null and b/src/main/java/g1001_1100/s1038_binary_search_tree_to_greater_sum_tree/tree.png differ diff --git a/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/readme.md b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/readme.md index 780bfecba..4df647a59 100644 --- a/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/readme.md +++ b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/readme.md @@ -10,7 +10,7 @@ Return _the smallest possible total score that you can achieve with some triangu **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/25/shape1.jpg) +![](shape1.jpg) **Input:** values = [1,2,3] @@ -20,7 +20,7 @@ Return _the smallest possible total score that you can achieve with some triangu **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/25/shape2.jpg) +![](shape2.jpg) **Input:** values = [3,7,4,5] @@ -30,7 +30,7 @@ Return _the smallest possible total score that you can achieve with some triangu **Example 3:** -![](https://assets.leetcode.com/uploads/2021/02/25/shape3.jpg) +![](shape3.jpg) **Input:** values = [1,3,1,4,1,5] diff --git a/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape1.jpg b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape1.jpg new file mode 100644 index 000000000..20b2b5c05 Binary files /dev/null and b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape1.jpg differ diff --git a/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape2.jpg b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape2.jpg new file mode 100644 index 000000000..4e3977c51 Binary files /dev/null and b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape2.jpg differ diff --git a/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape3.jpg b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape3.jpg new file mode 100644 index 000000000..605562832 Binary files /dev/null and b/src/main/java/g1001_1100/s1039_minimum_score_triangulation_of_polygon/shape3.jpg differ diff --git a/src/main/java/g1001_1100/s1074_number_of_submatrices_that_sum_to_target/mate1.jpg b/src/main/java/g1001_1100/s1074_number_of_submatrices_that_sum_to_target/mate1.jpg new file mode 100644 index 000000000..d09349875 Binary files /dev/null and b/src/main/java/g1001_1100/s1074_number_of_submatrices_that_sum_to_target/mate1.jpg differ diff --git a/src/main/java/g1001_1100/s1074_number_of_submatrices_that_sum_to_target/readme.md b/src/main/java/g1001_1100/s1074_number_of_submatrices_that_sum_to_target/readme.md index ee394667e..209a165c4 100644 --- a/src/main/java/g1001_1100/s1074_number_of_submatrices_that_sum_to_target/readme.md +++ b/src/main/java/g1001_1100/s1074_number_of_submatrices_that_sum_to_target/readme.md @@ -10,7 +10,7 @@ Two submatrices `(x1, y1, x2, y2)` and `(x1', y1', x2', y2')` are different if t **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/02/mate1.jpg) +![](mate1.jpg) **Input:** matrix = [[0,1,0],[1,1,1],[0,1,0]], target = 0 diff --git a/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/insufficient-11.png b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/insufficient-11.png new file mode 100644 index 000000000..b2c4ad0c4 Binary files /dev/null and b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/insufficient-11.png differ diff --git a/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/insufficient-3.png b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/insufficient-3.png new file mode 100644 index 000000000..b6728d985 Binary files /dev/null and b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/insufficient-3.png differ diff --git a/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/readme.md b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/readme.md index 8084d596e..576e9df2b 100644 --- a/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/readme.md +++ b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/readme.md @@ -10,7 +10,7 @@ A **leaf** is a node with no children. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/06/05/insufficient-11.png) +![](insufficient-11.png) **Input:** root = [1,2,3,4,-99,-99,7,8,9,-99,-99,12,13,-99,14], limit = 1 @@ -18,7 +18,7 @@ A **leaf** is a node with no children. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/06/05/insufficient-3.png) +![](insufficient-3.png) **Input:** root = [5,4,8,11,null,17,4,7,1,null,null,5,3], limit = 22 @@ -26,7 +26,7 @@ A **leaf** is a node with no children. **Example 3:** -![](https://assets.leetcode.com/uploads/2019/06/11/screen-shot-2019-06-11-at-83301-pm.png) +![](screen-shot-2019-06-11-at-83301-pm.png) **Input:** root = [1,2,-3,-5,null,4,null], limit = -1 diff --git a/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/screen-shot-2019-06-11-at-83301-pm.png b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/screen-shot-2019-06-11-at-83301-pm.png new file mode 100644 index 000000000..21953a544 Binary files /dev/null and b/src/main/java/g1001_1100/s1080_insufficient_nodes_in_root_to_leaf_paths/screen-shot-2019-06-11-at-83301-pm.png differ diff --git a/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/example1_1.png b/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/example1_1.png new file mode 100644 index 000000000..6bd89c9eb Binary files /dev/null and b/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/example1_1.png differ diff --git a/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/example2_1.png b/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/example2_1.png new file mode 100644 index 000000000..19565d000 Binary files /dev/null and b/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/example2_1.png differ diff --git a/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/readme.md b/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/readme.md index 56683ff7c..fddd16504 100644 --- a/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/readme.md +++ b/src/main/java/g1001_1100/s1091_shortest_path_in_binary_matrix/readme.md @@ -13,7 +13,7 @@ The **length of a clear path** is the number of visited cells of this path. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/18/example1_1.png) +![](example1_1.png) **Input:** grid = [[0,1],[1,0]] @@ -21,7 +21,7 @@ The **length of a clear path** is the number of visited cells of this path. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/18/example2_1.png) +![](example2_1.png) **Input:** grid = [[0,0,0],[1,1,0],[1,1,0]] diff --git a/src/main/java/g1101_1200/s1104_path_in_zigzag_labelled_binary_tree/readme.md b/src/main/java/g1101_1200/s1104_path_in_zigzag_labelled_binary_tree/readme.md index 3efdff192..b9b677e98 100644 --- a/src/main/java/g1101_1200/s1104_path_in_zigzag_labelled_binary_tree/readme.md +++ b/src/main/java/g1101_1200/s1104_path_in_zigzag_labelled_binary_tree/readme.md @@ -6,7 +6,7 @@ In an infinite binary tree where every node has two children, the nodes are labe In the odd numbered rows (ie., the first, third, fifth,...), the labelling is left to right, while in the even numbered rows (second, fourth, sixth,...), the labelling is right to left. -![](https://assets.leetcode.com/uploads/2019/06/24/tree.png) +![](tree.png) Given the `label` of a node in this tree, return the labels in the path from the root of the tree to the node with that `label`. diff --git a/src/main/java/g1101_1200/s1104_path_in_zigzag_labelled_binary_tree/tree.png b/src/main/java/g1101_1200/s1104_path_in_zigzag_labelled_binary_tree/tree.png new file mode 100644 index 000000000..50408e518 Binary files /dev/null and b/src/main/java/g1101_1200/s1104_path_in_zigzag_labelled_binary_tree/tree.png differ diff --git a/src/main/java/g1101_1200/s1105_filling_bookcase_shelves/readme.md b/src/main/java/g1101_1200/s1105_filling_bookcase_shelves/readme.md index 06c2696e0..3fde4c95c 100644 --- a/src/main/java/g1101_1200/s1105_filling_bookcase_shelves/readme.md +++ b/src/main/java/g1101_1200/s1105_filling_bookcase_shelves/readme.md @@ -16,7 +16,7 @@ Return _the minimum possible height that the total bookshelf can be after placin **Example 1:** -![](https://assets.leetcode.com/uploads/2019/06/24/shelves.png) +![](shelves.png) **Input:** books = [[1,1],[2,3],[2,3],[1,1],[1,1],[1,1],[1,2]], shelf\_width = 4 diff --git a/src/main/java/g1101_1200/s1105_filling_bookcase_shelves/shelves.png b/src/main/java/g1101_1200/s1105_filling_bookcase_shelves/shelves.png new file mode 100644 index 000000000..897d408ce Binary files /dev/null and b/src/main/java/g1101_1200/s1105_filling_bookcase_shelves/shelves.png differ diff --git a/src/main/java/g1101_1200/s1110_delete_nodes_and_return_forest/readme.md b/src/main/java/g1101_1200/s1110_delete_nodes_and_return_forest/readme.md index 61c27ff3b..0d5201941 100644 --- a/src/main/java/g1101_1200/s1110_delete_nodes_and_return_forest/readme.md +++ b/src/main/java/g1101_1200/s1110_delete_nodes_and_return_forest/readme.md @@ -10,7 +10,7 @@ Return the roots of the trees in the remaining forest. You may return the result **Example 1:** -![](https://assets.leetcode.com/uploads/2019/07/01/screen-shot-2019-07-01-at-53836-pm.png) +![](screen-shot-2019-07-01-at-53836-pm.png) **Input:** root = [1,2,3,4,5,6,7], to\_delete = [3,5] diff --git a/src/main/java/g1101_1200/s1110_delete_nodes_and_return_forest/screen-shot-2019-07-01-at-53836-pm.png b/src/main/java/g1101_1200/s1110_delete_nodes_and_return_forest/screen-shot-2019-07-01-at-53836-pm.png new file mode 100644 index 000000000..385bb25aa Binary files /dev/null and b/src/main/java/g1101_1200/s1110_delete_nodes_and_return_forest/screen-shot-2019-07-01-at-53836-pm.png differ diff --git a/src/main/java/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/readme.md b/src/main/java/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/readme.md index 887eb570f..7c89d0e86 100644 --- a/src/main/java/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/readme.md +++ b/src/main/java/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/readme.md @@ -12,7 +12,7 @@ Recall that: **Example 1:** -![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/01/sketch1.png) +![](sketch1.png) **Input:** root = [3,5,1,6,2,0,8,null,null,7,4] diff --git a/src/main/java/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/sketch1.png b/src/main/java/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/sketch1.png new file mode 100644 index 000000000..7d1a945b8 Binary files /dev/null and b/src/main/java/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/sketch1.png differ diff --git a/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/readme.md b/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/readme.md index 00f32d433..536d5fb77 100644 --- a/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/readme.md +++ b/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/readme.md @@ -14,7 +14,7 @@ A node is a **leaf** if and only if it has zero children. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/10/tree1.jpg) +![](tree1.jpg) **Input:** arr = [6,2,4] @@ -24,7 +24,7 @@ A node is a **leaf** if and only if it has zero children. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/08/10/tree2.jpg) +![](tree2.jpg) **Input:** arr = [4,11] diff --git a/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/tree1.jpg b/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/tree1.jpg new file mode 100644 index 000000000..b444493e9 Binary files /dev/null and b/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/tree1.jpg differ diff --git a/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/tree2.jpg b/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/tree2.jpg new file mode 100644 index 000000000..c1fdd0b62 Binary files /dev/null and b/src/main/java/g1101_1200/s1130_minimum_cost_tree_from_leaf_values/tree2.jpg differ diff --git a/src/main/java/g1101_1200/s1138_alphabet_board_path/azboard.png b/src/main/java/g1101_1200/s1138_alphabet_board_path/azboard.png new file mode 100644 index 000000000..db370622e Binary files /dev/null and b/src/main/java/g1101_1200/s1138_alphabet_board_path/azboard.png differ diff --git a/src/main/java/g1101_1200/s1138_alphabet_board_path/readme.md b/src/main/java/g1101_1200/s1138_alphabet_board_path/readme.md index fa923380a..ccfc5379b 100644 --- a/src/main/java/g1101_1200/s1138_alphabet_board_path/readme.md +++ b/src/main/java/g1101_1200/s1138_alphabet_board_path/readme.md @@ -6,7 +6,7 @@ On an alphabet board, we start at position `(0, 0)`, corresponding to character Here, `board = ["abcde", "fghij", "klmno", "pqrst", "uvwxy", "z"]`, as shown in the diagram below. -![](https://assets.leetcode.com/uploads/2019/07/28/azboard.png) +![](azboard.png) We may make the following moves: diff --git a/src/main/java/g1101_1200/s1145_binary_tree_coloring_game/1480-binary-tree-coloring-game.png b/src/main/java/g1101_1200/s1145_binary_tree_coloring_game/1480-binary-tree-coloring-game.png new file mode 100644 index 000000000..e81767a8b Binary files /dev/null and b/src/main/java/g1101_1200/s1145_binary_tree_coloring_game/1480-binary-tree-coloring-game.png differ diff --git a/src/main/java/g1101_1200/s1145_binary_tree_coloring_game/readme.md b/src/main/java/g1101_1200/s1145_binary_tree_coloring_game/readme.md index 6d0e989e8..45b66e40b 100644 --- a/src/main/java/g1101_1200/s1145_binary_tree_coloring_game/readme.md +++ b/src/main/java/g1101_1200/s1145_binary_tree_coloring_game/readme.md @@ -14,7 +14,7 @@ You are the second player. If it is possible to choose such a `y` to ensure you **Example 1:** -![](https://assets.leetcode.com/uploads/2019/08/01/1480-binary-tree-coloring-game.png) +![](1480-binary-tree-coloring-game.png) **Input:** root = [1,2,3,4,5,6,7,8,9,10,11], n = 11, x = 3 diff --git a/src/main/java/g1101_1200/s1161_maximum_level_sum_of_a_binary_tree/capture.jpg b/src/main/java/g1101_1200/s1161_maximum_level_sum_of_a_binary_tree/capture.jpg new file mode 100644 index 000000000..f524e7484 Binary files /dev/null and b/src/main/java/g1101_1200/s1161_maximum_level_sum_of_a_binary_tree/capture.jpg differ diff --git a/src/main/java/g1101_1200/s1161_maximum_level_sum_of_a_binary_tree/readme.md b/src/main/java/g1101_1200/s1161_maximum_level_sum_of_a_binary_tree/readme.md index c1cb97d4a..79bd6e34c 100644 --- a/src/main/java/g1101_1200/s1161_maximum_level_sum_of_a_binary_tree/readme.md +++ b/src/main/java/g1101_1200/s1161_maximum_level_sum_of_a_binary_tree/readme.md @@ -8,7 +8,7 @@ Return the **smallest** level `x` such that the sum of all the values of nodes a **Example 1:** -![](https://assets.leetcode.com/uploads/2019/05/03/capture.JPG) +![](capture.jpg) **Input:** root = [1,7,0,7,-8,null,null] diff --git a/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/1336_ex1.jpg b/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/1336_ex1.jpg new file mode 100644 index 000000000..072ff73fb Binary files /dev/null and b/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/1336_ex1.jpg differ diff --git a/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/1336_ex2.jpg b/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/1336_ex2.jpg new file mode 100644 index 000000000..337d4c4af Binary files /dev/null and b/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/1336_ex2.jpg differ diff --git a/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/readme.md b/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/readme.md index 6d454bcb5..ace2dc9f4 100644 --- a/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/readme.md +++ b/src/main/java/g1101_1200/s1162_as_far_from_land_as_possible/readme.md @@ -8,7 +8,7 @@ The distance used in this problem is the Manhattan distance: the distance betwee **Example 1:** -![](https://assets.leetcode.com/uploads/2019/05/03/1336_ex1.JPG) +![](1336_ex1.jpg) **Input:** grid = [[1,0,1],[0,0,0],[1,0,1]] @@ -18,7 +18,7 @@ The distance used in this problem is the Manhattan distance: the distance betwee **Example 2:** -![](https://assets.leetcode.com/uploads/2019/05/03/1336_ex2.JPG) +![](1336_ex2.jpg) **Input:** grid = [[1,0,0],[0,0,0],[0,0,0]] diff --git a/src/main/java/g1101_1200/s1184_distance_between_bus_stops/readme.md b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/readme.md index 2d1a32c11..815db2056 100644 --- a/src/main/java/g1101_1200/s1184_distance_between_bus_stops/readme.md +++ b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/readme.md @@ -10,7 +10,7 @@ Return the shortest distance between the given `start` and `destination` stops. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/09/03/untitled-diagram-1.jpg) +![](untitled-diagram-1.jpg) **Input:** distance = [1,2,3,4], start = 0, destination = 1 @@ -20,7 +20,7 @@ Return the shortest distance between the given `start` and `destination` stops. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/09/03/untitled-diagram-1-1.jpg) +![](untitled-diagram-1-1.jpg) **Input:** distance = [1,2,3,4], start = 0, destination = 2 @@ -30,7 +30,7 @@ Return the shortest distance between the given `start` and `destination` stops. **Example 3:** -![](https://assets.leetcode.com/uploads/2019/09/03/untitled-diagram-1-2.jpg) +![](untitled-diagram-1-2.jpg) **Input:** distance = [1,2,3,4], start = 0, destination = 3 diff --git a/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1-1.jpg b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1-1.jpg new file mode 100644 index 000000000..c51417365 Binary files /dev/null and b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1-1.jpg differ diff --git a/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1-2.jpg b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1-2.jpg new file mode 100644 index 000000000..829a374fd Binary files /dev/null and b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1-2.jpg differ diff --git a/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1.jpg b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1.jpg new file mode 100644 index 000000000..a7809665f Binary files /dev/null and b/src/main/java/g1101_1200/s1184_distance_between_bus_stops/untitled-diagram-1.jpg differ diff --git a/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/1536_ex1_upd.jpg b/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/1536_ex1_upd.jpg new file mode 100644 index 000000000..00c66e32e Binary files /dev/null and b/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/1536_ex1_upd.jpg differ diff --git a/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/1536_ex2_upd.jpg b/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/1536_ex2_upd.jpg new file mode 100644 index 000000000..1c5258c61 Binary files /dev/null and b/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/1536_ex2_upd.jpg differ diff --git a/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/readme.md b/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/readme.md index 548d7f33b..f4e71186e 100644 --- a/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/readme.md +++ b/src/main/java/g1101_1200/s1189_maximum_number_of_balloons/readme.md @@ -8,7 +8,7 @@ You can use each character in `text` **at most once**. Return the maximum number **Example 1:** -**![](https://assets.leetcode.com/uploads/2019/09/05/1536_ex1_upd.JPG)** +**![](1536_ex1_upd.jpg)** **Input:** text = "nlaebolko" @@ -16,7 +16,7 @@ You can use each character in `text` **at most once**. Return the maximum number **Example 2:** -**![](https://assets.leetcode.com/uploads/2019/09/05/1536_ex2_upd.JPG)** +**![](1536_ex2_upd.jpg)** **Input:** text = "loonbalxballpoon" diff --git a/src/main/java/g1101_1200/s1192_critical_connections_in_a_network/1537_ex1_2.png b/src/main/java/g1101_1200/s1192_critical_connections_in_a_network/1537_ex1_2.png new file mode 100644 index 000000000..1f316ebe4 Binary files /dev/null and b/src/main/java/g1101_1200/s1192_critical_connections_in_a_network/1537_ex1_2.png differ diff --git a/src/main/java/g1101_1200/s1192_critical_connections_in_a_network/readme.md b/src/main/java/g1101_1200/s1192_critical_connections_in_a_network/readme.md index fce1c3811..992b30f5e 100644 --- a/src/main/java/g1101_1200/s1192_critical_connections_in_a_network/readme.md +++ b/src/main/java/g1101_1200/s1192_critical_connections_in_a_network/readme.md @@ -10,7 +10,7 @@ Return all critical connections in the network in any order. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/09/03/1537_ex1_2.png) +![](1537_ex1_2.png) **Input:** n = 4, connections = [[0,1],[1,2],[2,0],[1,3]] diff --git a/src/main/java/g1201_1300/s1203_sort_items_by_groups_respecting_dependencies/1359_ex1.png b/src/main/java/g1201_1300/s1203_sort_items_by_groups_respecting_dependencies/1359_ex1.png new file mode 100644 index 000000000..524e5b321 Binary files /dev/null and b/src/main/java/g1201_1300/s1203_sort_items_by_groups_respecting_dependencies/1359_ex1.png differ diff --git a/src/main/java/g1201_1300/s1203_sort_items_by_groups_respecting_dependencies/readme.md b/src/main/java/g1201_1300/s1203_sort_items_by_groups_respecting_dependencies/readme.md index 0c93a7694..b1d04362f 100644 --- a/src/main/java/g1201_1300/s1203_sort_items_by_groups_respecting_dependencies/readme.md +++ b/src/main/java/g1201_1300/s1203_sort_items_by_groups_respecting_dependencies/readme.md @@ -13,7 +13,7 @@ Return any solution if there is more than one solution and return an **empty lis **Example 1:** -**![](https://assets.leetcode.com/uploads/2019/09/11/1359_ex1.png)** +**![](1359_ex1.png)** **Input:** n = 8, m = 2, group = [-1,-1,1,0,0,1,0,-1], beforeItems = [[],[6],[5],[6],[3,6],[],[],[]] diff --git a/src/main/java/g1201_1300/s1206_design_skiplist/1506_skiplist.gif b/src/main/java/g1201_1300/s1206_design_skiplist/1506_skiplist.gif new file mode 100644 index 000000000..d21bd5234 Binary files /dev/null and b/src/main/java/g1201_1300/s1206_design_skiplist/1506_skiplist.gif differ diff --git a/src/main/java/g1201_1300/s1206_design_skiplist/readme.md b/src/main/java/g1201_1300/s1206_design_skiplist/readme.md index 29b58fd3c..50459174c 100644 --- a/src/main/java/g1201_1300/s1206_design_skiplist/readme.md +++ b/src/main/java/g1201_1300/s1206_design_skiplist/readme.md @@ -8,7 +8,7 @@ A **skiplist** is a data structure that takes `O(log(n))` time to add, erase and For example, we have a Skiplist containing `[30,40,50,60,70,90]` and we want to add `80` and `45` into it. The Skiplist works this way: -![](https://assets.leetcode.com/uploads/2019/09/27/1506_skiplist.gif) +![](1506_skiplist.gif) Artyom Kalinin [CC BY-SA 3.0], via [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Skip_list_add_element-en.gif "Artyom Kalinin [CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons") You can see there are many layers in the Skiplist. Each layer is a sorted linked list. With the help of the top layers, add, erase and search can be faster than `O(n)`. It can be proven that the average time complexity for each operation is `O(log(n))` and space complexity is `O(n)`. diff --git a/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image-1.png b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image-1.png new file mode 100644 index 000000000..113e2fb32 Binary files /dev/null and b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image-1.png differ diff --git a/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image-2.png b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image-2.png new file mode 100644 index 000000000..fc18f9ce2 Binary files /dev/null and b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image-2.png differ diff --git a/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image.png b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image.png new file mode 100644 index 000000000..151fac7c4 Binary files /dev/null and b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/image.png differ diff --git a/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/readme.md b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/readme.md index 800f4de89..775f52953 100644 --- a/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/readme.md +++ b/src/main/java/g1201_1300/s1210_minimum_moves_to_reach_target_with_rotations/readme.md @@ -9,9 +9,9 @@ In one move the snake can: * Move one cell to the right if there are no blocked cells there. This move keeps the horizontal/vertical position of the snake as it is. * Move down one cell if there are no blocked cells there. This move keeps the horizontal/vertical position of the snake as it is. * Rotate clockwise if it's in a horizontal position and the two cells under it are both empty. In that case the snake moves from `(r, c)` and `(r, c+1)` to `(r, c)` and `(r+1, c)`. - ![](https://assets.leetcode.com/uploads/2019/09/24/image-2.png) + ![](image-2.png) * Rotate counterclockwise if it's in a vertical position and the two cells to its right are both empty. In that case the snake moves from `(r, c)` and `(r+1, c)` to `(r, c)` and `(r, c+1)`. - ![](https://assets.leetcode.com/uploads/2019/09/24/image-1.png) + ![](image-1.png) Return the minimum number of moves to reach the target. @@ -19,7 +19,7 @@ If there is no way to reach the target, return `-1`. **Example 1:** -**![](https://assets.leetcode.com/uploads/2019/09/24/image.png)** +**![](image.png)** **Input:** diff --git a/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/chip_e2.jpg b/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/chip_e2.jpg new file mode 100644 index 000000000..9deff5ae4 Binary files /dev/null and b/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/chip_e2.jpg differ diff --git a/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/chips_e1.jpg b/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/chips_e1.jpg new file mode 100644 index 000000000..e002754ad Binary files /dev/null and b/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/chips_e1.jpg differ diff --git a/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/readme.md b/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/readme.md index 8065d9b42..8e56ca1e1 100644 --- a/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/readme.md +++ b/src/main/java/g1201_1300/s1217_minimum_cost_to_move_chips_to_the_same_position/readme.md @@ -13,7 +13,7 @@ Return _the minimum cost_ needed to move all the chips to the same position. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/15/chips_e1.jpg) +![](chips_e1.jpg) **Input:** position = [1,2,3] @@ -23,7 +23,7 @@ Return _the minimum cost_ needed to move all the chips to the same position. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/08/15/chip_e2.jpg) +![](chip_e2.jpg) **Input:** position = [2,2,2,3,3] diff --git a/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/readme.md b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/readme.md index 825c3f395..7071af2c7 100644 --- a/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/readme.md +++ b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/readme.md @@ -8,7 +8,7 @@ Given an array of integer coordinates `queens` that represents the positions of **Example 1:** -![](https://assets.leetcode.com/uploads/2019/10/01/untitled-diagram.jpg) +![](untitled-diagram.jpg) **Input:** queens = [[0,1],[1,0],[4,0],[0,4],[3,3],[2,4]], king = [0,0] @@ -30,7 +30,7 @@ The queen at [2,4] can't attack the king cause it's not in the same row/column/d **Example 2:** -**![](https://assets.leetcode.com/uploads/2019/10/01/untitled-diagram-1.jpg)** +**![](untitled-diagram-1.jpg)** **Input:** queens = [[0,0],[1,1],[2,2],[3,4],[3,5],[4,4],[4,5]], king = [3,3] @@ -38,7 +38,7 @@ The queen at [2,4] can't attack the king cause it's not in the same row/column/d **Example 3:** -**![](https://assets.leetcode.com/uploads/2019/10/01/untitled-diagram-2.jpg)** +**![](untitled-diagram-2.jpg)** **Input:** queens = [[5,6],[7,7],[2,1],[0,7],[1,6],[5,1],[3,7],[0,3],[4,0],[1,2],[6,3],[5,0],[0,4],[2,2],[1,1],[6,4],[5,4],[0,0],[2,6],[4,5],[5,2],[1,4],[7,5],[2,3],[0,5],[4,2],[1,0],[2,7],[0,1],[4,6],[6,1],[0,6],[4,3],[1,7]], king = [3,4] diff --git a/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram-1.jpg b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram-1.jpg new file mode 100644 index 000000000..0ee29589b Binary files /dev/null and b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram-1.jpg differ diff --git a/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram-2.jpg b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram-2.jpg new file mode 100644 index 000000000..9c5d3d6ae Binary files /dev/null and b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram-2.jpg differ diff --git a/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram.jpg b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram.jpg new file mode 100644 index 000000000..9ebb35580 Binary files /dev/null and b/src/main/java/g1201_1300/s1222_queens_that_can_attack_the_king/untitled-diagram.jpg differ diff --git a/src/main/java/g1201_1300/s1226_the_dining_philosophers/an_illustration_of_the_dining_philosophers_problem.png b/src/main/java/g1201_1300/s1226_the_dining_philosophers/an_illustration_of_the_dining_philosophers_problem.png new file mode 100644 index 000000000..2837accd9 Binary files /dev/null and b/src/main/java/g1201_1300/s1226_the_dining_philosophers/an_illustration_of_the_dining_philosophers_problem.png differ diff --git a/src/main/java/g1201_1300/s1226_the_dining_philosophers/readme.md b/src/main/java/g1201_1300/s1226_the_dining_philosophers/readme.md index cfe526ae2..d541ca804 100644 --- a/src/main/java/g1201_1300/s1226_the_dining_philosophers/readme.md +++ b/src/main/java/g1201_1300/s1226_the_dining_philosophers/readme.md @@ -10,7 +10,7 @@ Eating is not limited by the remaining amounts of spaghetti or stomach space; an Design a discipline of behaviour (a concurrent algorithm) such that no philosopher will starve; _i.e._, each can forever continue to alternate between eating and thinking, assuming that no philosopher can know when others may want to eat or think. -![](https://assets.leetcode.com/uploads/2019/09/24/an_illustration_of_the_dining_philosophers_problem.png) +![](an_illustration_of_the_dining_philosophers_problem.png) _The problem statement and the image above are taken from [wikipedia.org](https://en.wikipedia.org/wiki/Dining_philosophers_problem)_ diff --git a/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/readme.md b/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/readme.md index 24a2dd219..e0b450edd 100644 --- a/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/readme.md +++ b/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/readme.md @@ -6,7 +6,7 @@ You are given an array `coordinates`, `coordinates[i] = [x, y]`, where `[x, y]` **Example 1:** -![](https://assets.leetcode.com/uploads/2019/10/15/untitled-diagram-2.jpg) +![](untitled-diagram-2.jpg) **Input:** coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]] @@ -14,7 +14,7 @@ You are given an array `coordinates`, `coordinates[i] = [x, y]`, where `[x, y]` **Example 2:** -**![](https://assets.leetcode.com/uploads/2019/10/09/untitled-diagram-1.jpg)** +**![](untitled-diagram-1.jpg)** **Input:** coordinates = [[1,1],[2,2],[3,4],[4,5],[5,6],[7,7]] diff --git a/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/untitled-diagram-1.jpg b/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/untitled-diagram-1.jpg new file mode 100644 index 000000000..fa9a07f25 Binary files /dev/null and b/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/untitled-diagram-1.jpg differ diff --git a/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/untitled-diagram-2.jpg b/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/untitled-diagram-2.jpg new file mode 100644 index 000000000..fd64ba284 Binary files /dev/null and b/src/main/java/g1201_1300/s1232_check_if_it_is_a_straight_line/untitled-diagram-2.jpg differ diff --git a/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/readme.md b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/readme.md index 2d73765f8..02b0bd01e 100644 --- a/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/readme.md +++ b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/readme.md @@ -10,7 +10,7 @@ If you choose a job that ends at time `X` you will be able to start another job **Example 1:** -**![](https://assets.leetcode.com/uploads/2019/10/10/sample1_1584.png)** +**![](sample1_1584.png)** **Input:** startTime = [1,2,3,3], endTime = [3,4,5,6], profit = [50,10,40,70] @@ -20,7 +20,7 @@ If you choose a job that ends at time `X` you will be able to start another job **Example 2:** -**![](https://assets.leetcode.com/uploads/2019/10/10/sample22_1584.png)** +**![](sample22_1584.png)** **Input:** startTime = [1,2,3,4,6], endTime = [3,5,10,6,9], profit = [20,20,100,70,60] @@ -30,7 +30,7 @@ If you choose a job that ends at time `X` you will be able to start another job **Example 3:** -**![](https://assets.leetcode.com/uploads/2019/10/10/sample3_1584.png)** +**![](sample3_1584.png)** **Input:** startTime = [1,1,1], endTime = [2,3,4], profit = [5,6,4] diff --git a/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample1_1584.png b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample1_1584.png new file mode 100644 index 000000000..f1b72bf7a Binary files /dev/null and b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample1_1584.png differ diff --git a/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample22_1584.png b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample22_1584.png new file mode 100644 index 000000000..b61ffa04d Binary files /dev/null and b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample22_1584.png differ diff --git a/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample3_1584.png b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample3_1584.png new file mode 100644 index 000000000..dfe7bfe94 Binary files /dev/null and b/src/main/java/g1201_1300/s1235_maximum_profit_in_job_scheduling/sample3_1584.png differ diff --git a/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/readme.md b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/readme.md index 8691c575f..5b4f44e5e 100644 --- a/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/readme.md +++ b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/readme.md @@ -6,7 +6,7 @@ Given a rectangle of size `n` x `m`, return _the minimum number of integer-sided **Example 1:** -![](https://assets.leetcode.com/uploads/2019/10/17/sample_11_1592.png) +![](sample_11_1592.png) **Input:** n = 2, m = 3 @@ -20,7 +20,7 @@ Given a rectangle of size `n` x `m`, return _the minimum number of integer-sided **Example 2:** -![](https://assets.leetcode.com/uploads/2019/10/17/sample_22_1592.png) +![](sample_22_1592.png) **Input:** n = 5, m = 8 @@ -28,7 +28,7 @@ Given a rectangle of size `n` x `m`, return _the minimum number of integer-sided **Example 3:** -![](https://assets.leetcode.com/uploads/2019/10/17/sample_33_1592.png) +![](sample_33_1592.png) **Input:** n = 11, m = 13 diff --git a/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_11_1592.png b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_11_1592.png new file mode 100644 index 000000000..77ceb2ba3 Binary files /dev/null and b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_11_1592.png differ diff --git a/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_22_1592.png b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_22_1592.png new file mode 100644 index 000000000..01c3a7ed2 Binary files /dev/null and b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_22_1592.png differ diff --git a/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_33_1592.png b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_33_1592.png new file mode 100644 index 000000000..eef219a23 Binary files /dev/null and b/src/main/java/g1201_1300/s1240_tiling_a_rectangle_with_the_fewest_squares/sample_33_1592.png differ diff --git a/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/e1.png b/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/e1.png new file mode 100644 index 000000000..cefbf31e8 Binary files /dev/null and b/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/e1.png differ diff --git a/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/e2.png b/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/e2.png new file mode 100644 index 000000000..c9432f0c6 Binary files /dev/null and b/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/e2.png differ diff --git a/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/readme.md b/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/readme.md index b57e91a65..ec76fd0a6 100644 --- a/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/readme.md +++ b/src/main/java/g1201_1300/s1252_cells_with_odd_values_in_a_matrix/readme.md @@ -13,7 +13,7 @@ Given `m`, `n`, and `indices`, return _the **number of odd-valued cells** in the **Example 1:** -![](https://assets.leetcode.com/uploads/2019/10/30/e1.png) +![](e1.png) **Input:** m = 2, n = 3, indices = [[0,1],[1,1]] @@ -27,7 +27,7 @@ The final matrix is [[1,3,1],[1,3,1]], which contains 6 odd numbers. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/10/30/e2.png) +![](e2.png) **Input:** m = 2, n = 2, indices = [[1,1],[0,0]] diff --git a/src/main/java/g1201_1300/s1254_number_of_closed_islands/readme.md b/src/main/java/g1201_1300/s1254_number_of_closed_islands/readme.md index 8dee6b026..9e4f67dc7 100644 --- a/src/main/java/g1201_1300/s1254_number_of_closed_islands/readme.md +++ b/src/main/java/g1201_1300/s1254_number_of_closed_islands/readme.md @@ -8,7 +8,7 @@ Return the number of _closed islands_. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/10/31/sample_3_1610.png) +![](sample_3_1610.png) **Input:** grid = [[1,1,1,1,1,1,1,0],[1,0,0,0,0,1,1,0],[1,0,1,0,1,1,1,0],[1,0,0,0,0,1,0,1],[1,1,1,1,1,1,1,0]] @@ -18,7 +18,7 @@ Return the number of _closed islands_. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/10/31/sample_4_1610.png) +![](sample_4_1610.png) **Input:** grid = [[0,0,1,0,0],[0,1,0,1,0],[0,1,1,1,0]] diff --git a/src/main/java/g1201_1300/s1254_number_of_closed_islands/sample_3_1610.png b/src/main/java/g1201_1300/s1254_number_of_closed_islands/sample_3_1610.png new file mode 100644 index 000000000..1851e1e06 Binary files /dev/null and b/src/main/java/g1201_1300/s1254_number_of_closed_islands/sample_3_1610.png differ diff --git a/src/main/java/g1201_1300/s1254_number_of_closed_islands/sample_4_1610.png b/src/main/java/g1201_1300/s1254_number_of_closed_islands/sample_4_1610.png new file mode 100644 index 000000000..2ab8d1cdd Binary files /dev/null and b/src/main/java/g1201_1300/s1254_number_of_closed_islands/sample_4_1610.png differ diff --git a/src/main/java/g1201_1300/s1260_shift_2d_grid/e1.png b/src/main/java/g1201_1300/s1260_shift_2d_grid/e1.png new file mode 100644 index 000000000..5ecd3b4ca Binary files /dev/null and b/src/main/java/g1201_1300/s1260_shift_2d_grid/e1.png differ diff --git a/src/main/java/g1201_1300/s1260_shift_2d_grid/e2.png b/src/main/java/g1201_1300/s1260_shift_2d_grid/e2.png new file mode 100644 index 000000000..51662b763 Binary files /dev/null and b/src/main/java/g1201_1300/s1260_shift_2d_grid/e2.png differ diff --git a/src/main/java/g1201_1300/s1260_shift_2d_grid/readme.md b/src/main/java/g1201_1300/s1260_shift_2d_grid/readme.md index ce6cf0215..fba41c30f 100644 --- a/src/main/java/g1201_1300/s1260_shift_2d_grid/readme.md +++ b/src/main/java/g1201_1300/s1260_shift_2d_grid/readme.md @@ -14,7 +14,7 @@ Return the _2D grid_ after applying shift operation `k` times. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/05/e1.png) +![](e1.png) **Input:** `grid` = [[1,2,3],[4,5,6],[7,8,9]], k = 1 @@ -22,7 +22,7 @@ Return the _2D grid_ after applying shift operation `k` times. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/11/05/e2.png) +![](e2.png) **Input:** `grid` = [[3,8,1,9],[19,7,2,5],[4,6,11,10],[12,0,21,13]], k = 4 diff --git a/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/readme.md b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/readme.md index 0c07173d9..0f54207a1 100644 --- a/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/readme.md +++ b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/readme.md @@ -17,7 +17,7 @@ Implement the `FindElements` class: **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/06/untitled-diagram-4-1.jpg) +![](untitled-diagram-4-1.jpg) **Input** ["FindElements","find","find"] [[[-1,null,-1]],[1],[2]] @@ -31,7 +31,7 @@ Implement the `FindElements` class: **Example 2:** -![](https://assets.leetcode.com/uploads/2019/11/06/untitled-diagram-4.jpg) +![](untitled-diagram-4.jpg) **Input** ["FindElements","find","find","find"] [[[-1,-1,-1,-1,-1]],[1],[3],[5]] @@ -46,7 +46,7 @@ Implement the `FindElements` class: **Example 3:** -![](https://assets.leetcode.com/uploads/2019/11/07/untitled-diagram-4-1-1.jpg) +![](untitled-diagram-4-1-1.jpg) **Input** ["FindElements","find","find","find","find"] [[[-1,null,-1,-1,null,-1]],[2],[3],[4],[5]] diff --git a/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4-1-1.jpg b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4-1-1.jpg new file mode 100644 index 000000000..e16319eae Binary files /dev/null and b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4-1-1.jpg differ diff --git a/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4-1.jpg b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4-1.jpg new file mode 100644 index 000000000..9360fd6ec Binary files /dev/null and b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4-1.jpg differ diff --git a/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4.jpg b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4.jpg new file mode 100644 index 000000000..f0a43f406 Binary files /dev/null and b/src/main/java/g1201_1300/s1261_find_elements_in_a_contaminated_binary_tree/untitled-diagram-4.jpg differ diff --git a/src/main/java/g1201_1300/s1263_minimum_moves_to_move_a_box_to_their_target_location/readme.md b/src/main/java/g1201_1300/s1263_minimum_moves_to_move_a_box_to_their_target_location/readme.md index 21a621722..7f0e82960 100644 --- a/src/main/java/g1201_1300/s1263_minimum_moves_to_move_a_box_to_their_target_location/readme.md +++ b/src/main/java/g1201_1300/s1263_minimum_moves_to_move_a_box_to_their_target_location/readme.md @@ -19,7 +19,7 @@ Return _the minimum number of **pushes** to move the box to the target_. If ther **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/06/sample_1_1620.png) +![](sample_1_1620.png) **Input:** diff --git a/src/main/java/g1201_1300/s1263_minimum_moves_to_move_a_box_to_their_target_location/sample_1_1620.png b/src/main/java/g1201_1300/s1263_minimum_moves_to_move_a_box_to_their_target_location/sample_1_1620.png new file mode 100644 index 000000000..9c9d918f5 Binary files /dev/null and b/src/main/java/g1201_1300/s1263_minimum_moves_to_move_a_box_to_their_target_location/sample_1_1620.png differ diff --git a/src/main/java/g1201_1300/s1266_minimum_time_visiting_all_points/1626_example_1.png b/src/main/java/g1201_1300/s1266_minimum_time_visiting_all_points/1626_example_1.png new file mode 100644 index 000000000..28a4190d6 Binary files /dev/null and b/src/main/java/g1201_1300/s1266_minimum_time_visiting_all_points/1626_example_1.png differ diff --git a/src/main/java/g1201_1300/s1266_minimum_time_visiting_all_points/readme.md b/src/main/java/g1201_1300/s1266_minimum_time_visiting_all_points/readme.md index 54b898042..047c96b48 100644 --- a/src/main/java/g1201_1300/s1266_minimum_time_visiting_all_points/readme.md +++ b/src/main/java/g1201_1300/s1266_minimum_time_visiting_all_points/readme.md @@ -15,7 +15,7 @@ You can move according to these rules: **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/14/1626_example_1.PNG) +![](1626_example_1.png) **Input:** points = [[1,1],[3,4],[-1,0]] diff --git a/src/main/java/g1201_1300/s1267_count_servers_that_communicate/readme.md b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/readme.md index f170a52fb..51f719ac9 100644 --- a/src/main/java/g1201_1300/s1267_count_servers_that_communicate/readme.md +++ b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/readme.md @@ -8,7 +8,7 @@ Return the number of servers that communicate with any other server. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/14/untitled-diagram-6.jpg) +![](untitled-diagram-6.jpg) **Input:** grid = [[1,0],[0,1]] @@ -18,7 +18,7 @@ Return the number of servers that communicate with any other server. **Example 2:** -**![](https://assets.leetcode.com/uploads/2019/11/13/untitled-diagram-4.jpg)** +**![](untitled-diagram-4.jpg)** **Input:** grid = [[1,0],[1,1]] @@ -28,7 +28,7 @@ Return the number of servers that communicate with any other server. **Example 3:** -![](https://assets.leetcode.com/uploads/2019/11/14/untitled-diagram-1-3.jpg) +![](untitled-diagram-1-3.jpg) **Input:** grid = [[1,1,0,0],[0,0,1,0],[0,0,1,0],[0,0,0,1]] diff --git a/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-1-3.jpg b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-1-3.jpg new file mode 100644 index 000000000..397a1593d Binary files /dev/null and b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-1-3.jpg differ diff --git a/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-4.jpg b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-4.jpg new file mode 100644 index 000000000..d074dec64 Binary files /dev/null and b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-4.jpg differ diff --git a/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-6.jpg b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-6.jpg new file mode 100644 index 000000000..ea9521053 Binary files /dev/null and b/src/main/java/g1201_1300/s1267_count_servers_that_communicate/untitled-diagram-6.jpg differ diff --git a/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/readme.md b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/readme.md index 9a42f713a..5bd7bf9ba 100644 --- a/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/readme.md +++ b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/readme.md @@ -17,7 +17,7 @@ You can assume that `moves` is valid (i.e., it follows the rules of **Tic-Tac-To **Example 1:** -![](https://assets.leetcode.com/uploads/2021/09/22/xo1-grid.jpg) +![](xo1-grid.jpg) **Input:** moves = [[0,0],[2,0],[1,1],[2,1],[2,2]] @@ -27,7 +27,7 @@ You can assume that `moves` is valid (i.e., it follows the rules of **Tic-Tac-To **Example 2:** -![](https://assets.leetcode.com/uploads/2021/09/22/xo2-grid.jpg) +![](xo2-grid.jpg) **Input:** moves = [[0,0],[1,1],[0,1],[0,2],[1,0],[2,0]] @@ -37,7 +37,7 @@ You can assume that `moves` is valid (i.e., it follows the rules of **Tic-Tac-To **Example 3:** -![](https://assets.leetcode.com/uploads/2021/09/22/xo3-grid.jpg) +![](xo3-grid.jpg) **Input:** moves = [[0,0],[1,1],[2,0],[1,0],[1,2],[2,1],[0,1],[0,2],[2,2]] diff --git a/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo1-grid.jpg b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo1-grid.jpg new file mode 100644 index 000000000..df84e885d Binary files /dev/null and b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo1-grid.jpg differ diff --git a/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo2-grid.jpg b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo2-grid.jpg new file mode 100644 index 000000000..6a44674b1 Binary files /dev/null and b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo2-grid.jpg differ diff --git a/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo3-grid.jpg b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo3-grid.jpg new file mode 100644 index 000000000..fa4ba5930 Binary files /dev/null and b/src/main/java/g1201_1300/s1275_find_winner_on_a_tic_tac_toe_game/xo3-grid.jpg differ diff --git a/src/main/java/g1201_1300/s1284_minimum_number_of_flips_to_convert_binary_matrix_to_zero_matrix/matrix.png b/src/main/java/g1201_1300/s1284_minimum_number_of_flips_to_convert_binary_matrix_to_zero_matrix/matrix.png new file mode 100644 index 000000000..0e4f1e525 Binary files /dev/null and b/src/main/java/g1201_1300/s1284_minimum_number_of_flips_to_convert_binary_matrix_to_zero_matrix/matrix.png differ diff --git a/src/main/java/g1201_1300/s1284_minimum_number_of_flips_to_convert_binary_matrix_to_zero_matrix/readme.md b/src/main/java/g1201_1300/s1284_minimum_number_of_flips_to_convert_binary_matrix_to_zero_matrix/readme.md index 39fc11e5e..521e90929 100644 --- a/src/main/java/g1201_1300/s1284_minimum_number_of_flips_to_convert_binary_matrix_to_zero_matrix/readme.md +++ b/src/main/java/g1201_1300/s1284_minimum_number_of_flips_to_convert_binary_matrix_to_zero_matrix/readme.md @@ -12,7 +12,7 @@ A **zero matrix** is a matrix with all cells equal to `0`. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/28/matrix.png) +![](matrix.png) **Input:** mat = [[0,0],[0,1]] diff --git a/src/main/java/g1201_1300/s1289_minimum_falling_path_sum_ii/falling-grid.jpg b/src/main/java/g1201_1300/s1289_minimum_falling_path_sum_ii/falling-grid.jpg new file mode 100644 index 000000000..b536caffe Binary files /dev/null and b/src/main/java/g1201_1300/s1289_minimum_falling_path_sum_ii/falling-grid.jpg differ diff --git a/src/main/java/g1201_1300/s1289_minimum_falling_path_sum_ii/readme.md b/src/main/java/g1201_1300/s1289_minimum_falling_path_sum_ii/readme.md index 52274e2fa..e0fa61bfb 100644 --- a/src/main/java/g1201_1300/s1289_minimum_falling_path_sum_ii/readme.md +++ b/src/main/java/g1201_1300/s1289_minimum_falling_path_sum_ii/readme.md @@ -8,7 +8,7 @@ A **falling path with non-zero shifts** is a choice of exactly one element from **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/10/falling-grid.jpg) +![](falling-grid.jpg) **Input:** arr = [[1,2,3],[4,5,6],[7,8,9]] diff --git a/src/main/java/g1201_1300/s1290_convert_binary_number_in_a_linked_list_to_integer/graph-1.png b/src/main/java/g1201_1300/s1290_convert_binary_number_in_a_linked_list_to_integer/graph-1.png new file mode 100644 index 000000000..39ff496f5 Binary files /dev/null and b/src/main/java/g1201_1300/s1290_convert_binary_number_in_a_linked_list_to_integer/graph-1.png differ diff --git a/src/main/java/g1201_1300/s1290_convert_binary_number_in_a_linked_list_to_integer/readme.md b/src/main/java/g1201_1300/s1290_convert_binary_number_in_a_linked_list_to_integer/readme.md index 5ce206d63..834a68a3b 100644 --- a/src/main/java/g1201_1300/s1290_convert_binary_number_in_a_linked_list_to_integer/readme.md +++ b/src/main/java/g1201_1300/s1290_convert_binary_number_in_a_linked_list_to_integer/readme.md @@ -8,7 +8,7 @@ Return the _decimal value_ of the number in the linked list. **Example 1:** -![](https://assets.leetcode.com/uploads/2019/12/05/graph-1.png) +![](graph-1.png) **Input:** head = [1,0,1] diff --git a/src/main/java/g1201_1300/s1292_maximum_side_length_of_a_square_with_sum_less_than_or_equal_to_threshold/e1.png b/src/main/java/g1201_1300/s1292_maximum_side_length_of_a_square_with_sum_less_than_or_equal_to_threshold/e1.png new file mode 100644 index 000000000..32c0da8ce Binary files /dev/null and b/src/main/java/g1201_1300/s1292_maximum_side_length_of_a_square_with_sum_less_than_or_equal_to_threshold/e1.png differ diff --git a/src/main/java/g1201_1300/s1292_maximum_side_length_of_a_square_with_sum_less_than_or_equal_to_threshold/readme.md b/src/main/java/g1201_1300/s1292_maximum_side_length_of_a_square_with_sum_less_than_or_equal_to_threshold/readme.md index cca5cefe9..147e97328 100644 --- a/src/main/java/g1201_1300/s1292_maximum_side_length_of_a_square_with_sum_less_than_or_equal_to_threshold/readme.md +++ b/src/main/java/g1201_1300/s1292_maximum_side_length_of_a_square_with_sum_less_than_or_equal_to_threshold/readme.md @@ -6,7 +6,7 @@ Given a `m x n` matrix `mat` and an integer `threshold`, return _the maximum sid **Example 1:** -![](https://assets.leetcode.com/uploads/2019/12/05/e1.png) +![](e1.png) **Input:** mat = [[1,1,3,2,4,3,2],[1,1,3,2,4,3,2],[1,1,3,2,4,3,2]], threshold = 4 diff --git a/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/readme.md b/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/readme.md index 4e0024c40..e5a27ac33 100644 --- a/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/readme.md +++ b/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/readme.md @@ -8,7 +8,7 @@ Return _the minimum number of **steps** to walk from the upper left corner_ `(0, **Example 1:** -![](https://assets.leetcode.com/uploads/2021/09/30/short1-grid.jpg) +![](short1-grid.jpg) **Input:** grid = [[0,0,0],[1,1,0],[0,0,0],[0,1,1],[0,0,0]], k = 1 @@ -22,7 +22,7 @@ The shortest path with one obstacle elimination at position (3,2) is 6. Such pat **Example 2:** -![](https://assets.leetcode.com/uploads/2021/09/30/short2-grid.jpg) +![](short2-grid.jpg) **Input:** grid = [[0,1,1],[1,1,1],[1,0,0]], k = 1 diff --git a/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/short1-grid.jpg b/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/short1-grid.jpg new file mode 100644 index 000000000..3229a64a1 Binary files /dev/null and b/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/short1-grid.jpg differ diff --git a/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/short2-grid.jpg b/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/short2-grid.jpg new file mode 100644 index 000000000..d1b98736a Binary files /dev/null and b/src/main/java/g1201_1300/s1293_shortest_path_in_a_grid_with_obstacles_elimination/short2-grid.jpg differ diff --git a/src/main/java/g1301_1400/s1302_deepest_leaves_sum/1483_ex1.png b/src/main/java/g1301_1400/s1302_deepest_leaves_sum/1483_ex1.png new file mode 100644 index 000000000..39ea9af25 Binary files /dev/null and b/src/main/java/g1301_1400/s1302_deepest_leaves_sum/1483_ex1.png differ diff --git a/src/main/java/g1301_1400/s1302_deepest_leaves_sum/readme.md b/src/main/java/g1301_1400/s1302_deepest_leaves_sum/readme.md index b797592b3..c9e1df3b7 100644 --- a/src/main/java/g1301_1400/s1302_deepest_leaves_sum/readme.md +++ b/src/main/java/g1301_1400/s1302_deepest_leaves_sum/readme.md @@ -6,7 +6,7 @@ Given the `root` of a binary tree, return _the sum of values of its deepest leav **Example 1:** -![](https://assets.leetcode.com/uploads/2019/07/31/1483_ex1.png) +![](1483_ex1.png) **Input:** root = [1,2,3,4,5,null,6,7,null,null,null,null,8] diff --git a/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/q2-e1.png b/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/q2-e1.png new file mode 100644 index 000000000..26ab00c47 Binary files /dev/null and b/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/q2-e1.png differ diff --git a/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/q2-e5-.png b/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/q2-e5-.png new file mode 100644 index 000000000..7a2fdb54a Binary files /dev/null and b/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/q2-e5-.png differ diff --git a/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/readme.md b/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/readme.md index 16694d407..25c79d0c9 100644 --- a/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/readme.md +++ b/src/main/java/g1301_1400/s1305_all_elements_in_two_binary_search_trees/readme.md @@ -6,7 +6,7 @@ Given two binary search trees `root1` and `root2`, return _a list containing all **Example 1:** -![](https://assets.leetcode.com/uploads/2019/12/18/q2-e1.png) +![](q2-e1.png) **Input:** root1 = [2,1,4], root2 = [1,0,3] @@ -14,7 +14,7 @@ Given two binary search trees `root1` and `root2`, return _a list containing all **Example 2:** -![](https://assets.leetcode.com/uploads/2019/12/18/q2-e5-.png) +![](q2-e5-.png) **Input:** root1 = [1,null,8], root2 = [8,1] diff --git a/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/leetcode_friends_1.png b/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/leetcode_friends_1.png new file mode 100644 index 000000000..c9c7c97b4 Binary files /dev/null and b/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/leetcode_friends_1.png differ diff --git a/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/leetcode_friends_2.png b/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/leetcode_friends_2.png new file mode 100644 index 000000000..6d5d6cab2 Binary files /dev/null and b/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/leetcode_friends_2.png differ diff --git a/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/readme.md b/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/readme.md index f63d13ce0..40c16309d 100644 --- a/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/readme.md +++ b/src/main/java/g1301_1400/s1311_get_watched_videos_by_your_friends/readme.md @@ -8,7 +8,7 @@ Level **1** of videos are all watched videos by your friends, level **2** of vid **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/01/02/leetcode_friends_1.png)** +**![](leetcode_friends_1.png)** **Input:** watchedVideos = [["A","B"],["C"],["B","C"],["D"]], friends = [[1,2],[0,3],[0,3],[1,2]], id = 0, level = 1 @@ -30,7 +30,7 @@ C -> 2 **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/01/02/leetcode_friends_2.png)** +**![](leetcode_friends_2.png)** **Input:** watchedVideos = [["A","B"],["C"],["B","C"],["D"]], friends = [[1,2],[0,3],[0,3],[1,2]], id = 0, level = 2 diff --git a/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/even1-tree.jpg b/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/even1-tree.jpg new file mode 100644 index 000000000..f85fc3b7a Binary files /dev/null and b/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/even1-tree.jpg differ diff --git a/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/even2-tree.jpg b/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/even2-tree.jpg new file mode 100644 index 000000000..9dc47d244 Binary files /dev/null and b/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/even2-tree.jpg differ diff --git a/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/readme.md b/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/readme.md index 739cdff16..24ca015b5 100644 --- a/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/readme.md +++ b/src/main/java/g1301_1400/s1315_sum_of_nodes_with_even_valued_grandparent/readme.md @@ -8,7 +8,7 @@ A **grandparent** of a node is the parent of its parent if it exists. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/10/even1-tree.jpg) +![](even1-tree.jpg) **Input:** root = [6,7,8,2,7,1,3,9,null,1,4,null,null,null,5] @@ -18,7 +18,7 @@ A **grandparent** of a node is the parent of its parent if it exists. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/08/10/even2-tree.jpg) +![](even2-tree.jpg) **Input:** root = [1] diff --git a/src/main/java/g1301_1400/s1318_minimum_flips_to_make_a_or_b_equal_to_c/readme.md b/src/main/java/g1301_1400/s1318_minimum_flips_to_make_a_or_b_equal_to_c/readme.md index 598d44626..cd6642a8b 100644 --- a/src/main/java/g1301_1400/s1318_minimum_flips_to_make_a_or_b_equal_to_c/readme.md +++ b/src/main/java/g1301_1400/s1318_minimum_flips_to_make_a_or_b_equal_to_c/readme.md @@ -7,7 +7,7 @@ Flip operation consists of change **any** single bit 1 to 0 or change the bit 0 **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/06/sample_3_1676.png) +![](sample_3_1676.png) **Input:** a = 2, b = 6, c = 5 diff --git a/src/main/java/g1301_1400/s1318_minimum_flips_to_make_a_or_b_equal_to_c/sample_3_1676.png b/src/main/java/g1301_1400/s1318_minimum_flips_to_make_a_or_b_equal_to_c/sample_3_1676.png new file mode 100644 index 000000000..ae7d4b6a4 Binary files /dev/null and b/src/main/java/g1301_1400/s1318_minimum_flips_to_make_a_or_b_equal_to_c/sample_3_1676.png differ diff --git a/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/readme.md b/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/readme.md index f75f475d0..67b5ef3ee 100644 --- a/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/readme.md +++ b/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/readme.md @@ -10,7 +10,7 @@ Return _the minimum number of times you need to do this in order to make all the **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/02/sample_1_1677.png) +![](sample_1_1677.png) **Input:** n = 4, connections = [[0,1],[0,2],[1,2]] @@ -20,7 +20,7 @@ Return _the minimum number of times you need to do this in order to make all the **Example 2:** -![](https://assets.leetcode.com/uploads/2020/01/02/sample_2_1677.png) +![](sample_2_1677.png) **Input:** n = 6, connections = [[0,1],[0,2],[0,3],[1,2],[1,3]] diff --git a/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/sample_1_1677.png b/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/sample_1_1677.png new file mode 100644 index 000000000..cfac2525d Binary files /dev/null and b/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/sample_1_1677.png differ diff --git a/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/sample_2_1677.png b/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/sample_2_1677.png new file mode 100644 index 000000000..9e03a13d0 Binary files /dev/null and b/src/main/java/g1301_1400/s1319_number_of_operations_to_make_network_connected/sample_2_1677.png differ diff --git a/src/main/java/g1301_1400/s1320_minimum_distance_to_type_a_word_using_two_fingers/leetcode_keyboard.png b/src/main/java/g1301_1400/s1320_minimum_distance_to_type_a_word_using_two_fingers/leetcode_keyboard.png new file mode 100644 index 000000000..308888c11 Binary files /dev/null and b/src/main/java/g1301_1400/s1320_minimum_distance_to_type_a_word_using_two_fingers/leetcode_keyboard.png differ diff --git a/src/main/java/g1301_1400/s1320_minimum_distance_to_type_a_word_using_two_fingers/readme.md b/src/main/java/g1301_1400/s1320_minimum_distance_to_type_a_word_using_two_fingers/readme.md index ca795162b..7444bab1e 100644 --- a/src/main/java/g1301_1400/s1320_minimum_distance_to_type_a_word_using_two_fingers/readme.md +++ b/src/main/java/g1301_1400/s1320_minimum_distance_to_type_a_word_using_two_fingers/readme.md @@ -2,7 +2,7 @@ Hard -![](https://assets.leetcode.com/uploads/2020/01/02/leetcode_keyboard.png) +![](leetcode_keyboard.png) You have a keyboard layout as shown above in the **X-Y** plane, where each English uppercase letter is located at some coordinate. diff --git a/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/readme.md b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/readme.md index 7a74d9c4c..253bc5f91 100644 --- a/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/readme.md +++ b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/readme.md @@ -8,7 +8,7 @@ Note that once you delete a leaf node with value `target`**,** if its parent nod **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/01/09/sample_1_1684.png)** +**![](sample_1_1684.png)** **Input:** root = [1,2,3,2,null,2,4], target = 2 @@ -18,7 +18,7 @@ Note that once you delete a leaf node with value `target`**,** if its parent nod **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/01/09/sample_2_1684.png)** +**![](sample_2_1684.png)** **Input:** root = [1,3,3,3,2], target = 3 @@ -26,7 +26,7 @@ Note that once you delete a leaf node with value `target`**,** if its parent nod **Example 3:** -**![](https://assets.leetcode.com/uploads/2020/01/15/sample_3_1684.png)** +**![](sample_3_1684.png)** **Input:** root = [1,2,null,2,null,2], target = 2 diff --git a/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_1_1684.png b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_1_1684.png new file mode 100644 index 000000000..65e81fa7c Binary files /dev/null and b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_1_1684.png differ diff --git a/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_2_1684.png b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_2_1684.png new file mode 100644 index 000000000..5d8a42c0f Binary files /dev/null and b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_2_1684.png differ diff --git a/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_3_1684.png b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_3_1684.png new file mode 100644 index 000000000..1a0ab1a69 Binary files /dev/null and b/src/main/java/g1301_1400/s1325_delete_leaves_with_a_given_value/sample_3_1684.png differ diff --git a/src/main/java/g1301_1400/s1326_minimum_number_of_taps_to_open_to_water_a_garden/1685_example_1.png b/src/main/java/g1301_1400/s1326_minimum_number_of_taps_to_open_to_water_a_garden/1685_example_1.png new file mode 100644 index 000000000..f8a44acdf Binary files /dev/null and b/src/main/java/g1301_1400/s1326_minimum_number_of_taps_to_open_to_water_a_garden/1685_example_1.png differ diff --git a/src/main/java/g1301_1400/s1326_minimum_number_of_taps_to_open_to_water_a_garden/readme.md b/src/main/java/g1301_1400/s1326_minimum_number_of_taps_to_open_to_water_a_garden/readme.md index 69227e9ad..fae074747 100644 --- a/src/main/java/g1301_1400/s1326_minimum_number_of_taps_to_open_to_water_a_garden/readme.md +++ b/src/main/java/g1301_1400/s1326_minimum_number_of_taps_to_open_to_water_a_garden/readme.md @@ -12,7 +12,7 @@ Return _the minimum number of taps_ that should be open to water the whole garde **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/16/1685_example_1.png) +![](1685_example_1.png) **Input:** n = 5, ranges = [3,4,1,1,0,0] diff --git a/src/main/java/g1301_1400/s1329_sort_the_matrix_diagonally/1482_example_1_2.png b/src/main/java/g1301_1400/s1329_sort_the_matrix_diagonally/1482_example_1_2.png new file mode 100644 index 000000000..804acb098 Binary files /dev/null and b/src/main/java/g1301_1400/s1329_sort_the_matrix_diagonally/1482_example_1_2.png differ diff --git a/src/main/java/g1301_1400/s1329_sort_the_matrix_diagonally/readme.md b/src/main/java/g1301_1400/s1329_sort_the_matrix_diagonally/readme.md index 4a6cab767..e3ce5febb 100644 --- a/src/main/java/g1301_1400/s1329_sort_the_matrix_diagonally/readme.md +++ b/src/main/java/g1301_1400/s1329_sort_the_matrix_diagonally/readme.md @@ -8,7 +8,7 @@ Given an `m x n` matrix `mat` of integers, sort each **matrix diagonal** in asce **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/21/1482_example_1_2.png) +![](1482_example_1_2.png) **Input:** mat = [[3,3,1,1],[2,2,1,2],[1,1,1,2]] diff --git a/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/find_the_city_01.png b/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/find_the_city_01.png new file mode 100644 index 000000000..4164e08c8 Binary files /dev/null and b/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/find_the_city_01.png differ diff --git a/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/find_the_city_02.png b/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/find_the_city_02.png new file mode 100644 index 000000000..3180c92b8 Binary files /dev/null and b/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/find_the_city_02.png differ diff --git a/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/readme.md b/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/readme.md index 73a934acd..fcce67ca3 100644 --- a/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/readme.md +++ b/src/main/java/g1301_1400/s1334_find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/readme.md @@ -10,7 +10,7 @@ Notice that the distance of a path connecting cities _**i**_ and _**j**_ is equa **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/16/find_the_city_01.png) +![](find_the_city_01.png) **Input:** n = 4, edges = [[0,1,3],[1,2,1],[1,3,4],[2,3,1]], distanceThreshold = 4 @@ -32,7 +32,7 @@ Cities 0 and 3 have 2 neighboring cities at a distanceThreshold = 4, but we have **Example 2:** -![](https://assets.leetcode.com/uploads/2020/01/16/find_the_city_02.png) +![](find_the_city_02.png) **Input:** n = 5, edges = [[0,1,2],[0,4,8],[1,2,3],[1,4,2],[2,3,1],[3,4,1]], distanceThreshold = 2 diff --git a/src/main/java/g1301_1400/s1335_minimum_difficulty_of_a_job_schedule/readme.md b/src/main/java/g1301_1400/s1335_minimum_difficulty_of_a_job_schedule/readme.md index c04f06ebc..f20726381 100644 --- a/src/main/java/g1301_1400/s1335_minimum_difficulty_of_a_job_schedule/readme.md +++ b/src/main/java/g1301_1400/s1335_minimum_difficulty_of_a_job_schedule/readme.md @@ -12,7 +12,7 @@ Return _the minimum difficulty of a job schedule_. If you cannot find a schedule **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/16/untitled.png) +![](untitled.png) **Input:** jobDifficulty = [6,5,4,3,2,1], d = 2 diff --git a/src/main/java/g1301_1400/s1335_minimum_difficulty_of_a_job_schedule/untitled.png b/src/main/java/g1301_1400/s1335_minimum_difficulty_of_a_job_schedule/untitled.png new file mode 100644 index 000000000..6d4a3f830 Binary files /dev/null and b/src/main/java/g1301_1400/s1335_minimum_difficulty_of_a_job_schedule/untitled.png differ diff --git a/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/readme.md b/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/readme.md index e5074ea38..9d0501899 100644 --- a/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/readme.md +++ b/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/readme.md @@ -10,7 +10,7 @@ Return _the maximum product of the sums of the two subtrees_. Since the answer m **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/21/sample_1_1699.png) +![](sample_1_1699.png) **Input:** root = [1,2,3,4,5,6] @@ -20,7 +20,7 @@ Return _the maximum product of the sums of the two subtrees_. Since the answer m **Example 2:** -![](https://assets.leetcode.com/uploads/2020/01/21/sample_2_1699.png) +![](sample_2_1699.png) **Input:** root = [1,null,2,3,4,null,null,5,6] diff --git a/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/sample_1_1699.png b/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/sample_1_1699.png new file mode 100644 index 000000000..04f0d2ec0 Binary files /dev/null and b/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/sample_1_1699.png differ diff --git a/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/sample_2_1699.png b/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/sample_2_1699.png new file mode 100644 index 000000000..b69cbb394 Binary files /dev/null and b/src/main/java/g1301_1400/s1339_maximum_product_of_splitted_binary_tree/sample_2_1699.png differ diff --git a/src/main/java/g1301_1400/s1340_jump_game_v/meta-chart.jpeg b/src/main/java/g1301_1400/s1340_jump_game_v/meta-chart.jpeg new file mode 100644 index 000000000..14c8f357b Binary files /dev/null and b/src/main/java/g1301_1400/s1340_jump_game_v/meta-chart.jpeg differ diff --git a/src/main/java/g1301_1400/s1340_jump_game_v/readme.md b/src/main/java/g1301_1400/s1340_jump_game_v/readme.md index 1dc04af91..10b66ab61 100644 --- a/src/main/java/g1301_1400/s1340_jump_game_v/readme.md +++ b/src/main/java/g1301_1400/s1340_jump_game_v/readme.md @@ -15,7 +15,7 @@ Notice that you can not jump outside of the array at any time. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/23/meta-chart.jpeg) +![](meta-chart.jpeg) **Input:** arr = [6,4,14,6,8,13,9,7,10,6,12], d = 2 diff --git a/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/readme.md b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/readme.md index 76859591a..9e5338f30 100644 --- a/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/readme.md +++ b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/readme.md @@ -8,7 +8,7 @@ Answers within 10-5 of the actual value will be accepted **Example 1:** -![](https://assets.leetcode.com/uploads/2019/12/26/sample_1_1673.png) +![](sample_1_1673.png) **Input:** hour = 12, minutes = 30 @@ -16,7 +16,7 @@ Answers within 10-5 of the actual value will be accepted **Example 2:** -![](https://assets.leetcode.com/uploads/2019/12/26/sample_2_1673.png) +![](sample_2_1673.png) **Input:** hour = 3, minutes = 30 @@ -24,7 +24,7 @@ Answers within 10-5 of the actual value will be accepted **Example 3:** -![](https://assets.leetcode.com/uploads/2019/12/26/sample_3_1673.png) +![](sample_3_1673.png) **Input:** hour = 3, minutes = 15 diff --git a/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_1_1673.png b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_1_1673.png new file mode 100644 index 000000000..e1ec7d4f5 Binary files /dev/null and b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_1_1673.png differ diff --git a/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_2_1673.png b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_2_1673.png new file mode 100644 index 000000000..28ac862af Binary files /dev/null and b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_2_1673.png differ diff --git a/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_3_1673.png b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_3_1673.png new file mode 100644 index 000000000..4e856601f Binary files /dev/null and b/src/main/java/g1301_1400/s1344_angle_between_hands_of_a_clock/sample_3_1673.png differ diff --git a/src/main/java/g1301_1400/s1349_maximum_students_taking_exam/image.png b/src/main/java/g1301_1400/s1349_maximum_students_taking_exam/image.png new file mode 100644 index 000000000..55ec0f05f Binary files /dev/null and b/src/main/java/g1301_1400/s1349_maximum_students_taking_exam/image.png differ diff --git a/src/main/java/g1301_1400/s1349_maximum_students_taking_exam/readme.md b/src/main/java/g1301_1400/s1349_maximum_students_taking_exam/readme.md index 376b25b3e..4854f4363 100644 --- a/src/main/java/g1301_1400/s1349_maximum_students_taking_exam/readme.md +++ b/src/main/java/g1301_1400/s1349_maximum_students_taking_exam/readme.md @@ -10,7 +10,7 @@ Students must be placed in seats in good condition. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/29/image.png) +![](image.png) **Input:** seats = [["#",".","#","#",".","#"], [".","#","#","#","#","."], diff --git a/src/main/java/g1301_1400/s1353_maximum_number_of_events_that_can_be_attended/e1.png b/src/main/java/g1301_1400/s1353_maximum_number_of_events_that_can_be_attended/e1.png new file mode 100644 index 000000000..619e0f483 Binary files /dev/null and b/src/main/java/g1301_1400/s1353_maximum_number_of_events_that_can_be_attended/e1.png differ diff --git a/src/main/java/g1301_1400/s1353_maximum_number_of_events_that_can_be_attended/readme.md b/src/main/java/g1301_1400/s1353_maximum_number_of_events_that_can_be_attended/readme.md index 503a063d6..def07961b 100644 --- a/src/main/java/g1301_1400/s1353_maximum_number_of_events_that_can_be_attended/readme.md +++ b/src/main/java/g1301_1400/s1353_maximum_number_of_events_that_can_be_attended/readme.md @@ -10,7 +10,7 @@ Return _the maximum number of events you can attend_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/05/e1.png) +![](e1.png) **Input:** events = [[1,2],[2,3],[3,4]] diff --git a/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex1.png b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex1.png new file mode 100644 index 000000000..84a2a5872 Binary files /dev/null and b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex1.png differ diff --git a/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex2.png b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex2.png new file mode 100644 index 000000000..aee0c20ed Binary files /dev/null and b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex2.png differ diff --git a/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex3.png b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex3.png new file mode 100644 index 000000000..3e5fa2684 Binary files /dev/null and b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/1503_ex3.png differ diff --git a/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/readme.md b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/readme.md index 54cf076fd..1a1917e46 100644 --- a/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/readme.md +++ b/src/main/java/g1301_1400/s1361_validate_binary_tree_nodes/readme.md @@ -10,7 +10,7 @@ Note that the nodes have no values and that we only use the node numbers in this **Example 1:** -![](https://assets.leetcode.com/uploads/2019/08/23/1503_ex1.png) +![](1503_ex1.png) **Input:** n = 4, leftChild = [1,-1,3,-1], rightChild = [2,-1,-1,-1] @@ -18,7 +18,7 @@ Note that the nodes have no values and that we only use the node numbers in this **Example 2:** -![](https://assets.leetcode.com/uploads/2019/08/23/1503_ex2.png) +![](1503_ex2.png) **Input:** n = 4, leftChild = [1,-1,3,-1], rightChild = [2,3,-1,-1] @@ -26,7 +26,7 @@ Note that the nodes have no values and that we only use the node numbers in this **Example 3:** -![](https://assets.leetcode.com/uploads/2019/08/23/1503_ex3.png) +![](1503_ex3.png) **Input:** n = 2, leftChild = [1,0], rightChild = [-1,-1] diff --git a/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/readme.md b/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/readme.md index c8f2dd3a6..fd413cae6 100644 --- a/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/readme.md +++ b/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/readme.md @@ -10,7 +10,7 @@ In this context downward path means a path that starts at some node and goes dow **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/02/12/sample_1_1720.png)** +**![](sample_1_1720.png)** **Input:** head = [4,2,8], root = [1,4,4,null,2,2,null,1,null,6,8,null,null,null,null,1,3] @@ -20,7 +20,7 @@ In this context downward path means a path that starts at some node and goes dow **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/02/12/sample_2_1720.png)** +**![](sample_2_1720.png)** **Input:** head = [1,4,2,6], root = [1,4,4,null,2,2,null,1,null,6,8,null,null,null,null,1,3] diff --git a/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/sample_1_1720.png b/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/sample_1_1720.png new file mode 100644 index 000000000..0ad8b12f2 Binary files /dev/null and b/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/sample_1_1720.png differ diff --git a/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/sample_2_1720.png b/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/sample_2_1720.png new file mode 100644 index 000000000..a5b5b3671 Binary files /dev/null and b/src/main/java/g1301_1400/s1367_linked_list_in_binary_tree/sample_2_1720.png differ diff --git a/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid1.png b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid1.png new file mode 100644 index 000000000..9b0e2ecf2 Binary files /dev/null and b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid1.png differ diff --git a/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid2.png b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid2.png new file mode 100644 index 000000000..6896e76dc Binary files /dev/null and b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid2.png differ diff --git a/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid3.png b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid3.png new file mode 100644 index 000000000..d8c7ecc70 Binary files /dev/null and b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/grid3.png differ diff --git a/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/readme.md b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/readme.md index 423450a28..a5452d9fa 100644 --- a/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/readme.md +++ b/src/main/java/g1301_1400/s1368_minimum_cost_to_make_at_least_one_valid_path_in_a_grid/readme.md @@ -19,7 +19,7 @@ Return _the minimum cost to make the grid have at least one valid path_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/13/grid1.png) +![](grid1.png) **Input:** grid = [[1,1,1,1],[2,2,2,2],[1,1,1,1],[2,2,2,2]] @@ -29,7 +29,7 @@ Return _the minimum cost to make the grid have at least one valid path_. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/02/13/grid2.png) +![](grid2.png) **Input:** grid = [[1,1,3],[3,2,2],[1,1,4]] @@ -39,7 +39,7 @@ Return _the minimum cost to make the grid have at least one valid path_. **Example 3:** -![](https://assets.leetcode.com/uploads/2020/02/13/grid3.png) +![](grid3.png) **Input:** grid = [[1,2],[4,3]] diff --git a/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/readme.md b/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/readme.md index eb987335c..c2ec64d22 100644 --- a/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/readme.md +++ b/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/readme.md @@ -17,7 +17,7 @@ Return _the longest **ZigZag** path contained in that tree_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/22/sample_1_1702.png) +![](sample_1_1702.png) **Input:** root = [1,null,1,1,1,null,null,1,1,null,1,null,null,null,1,null,1] @@ -27,7 +27,7 @@ Return _the longest **ZigZag** path contained in that tree_. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/01/22/sample_2_1702.png) +![](sample_2_1702.png) **Input:** root = [1,1,1,null,1,null,null,1,1,null,1] diff --git a/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/sample_1_1702.png b/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/sample_1_1702.png new file mode 100644 index 000000000..d43288c08 Binary files /dev/null and b/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/sample_1_1702.png differ diff --git a/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/sample_2_1702.png b/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/sample_2_1702.png new file mode 100644 index 000000000..cc841409b Binary files /dev/null and b/src/main/java/g1301_1400/s1372_longest_zigzag_path_in_a_binary_tree/sample_2_1702.png differ diff --git a/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/readme.md b/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/readme.md index b179605cd..15ff17007 100644 --- a/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/readme.md +++ b/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/readme.md @@ -12,7 +12,7 @@ Assume a BST is defined as follows: **Example 1:** -![](https://assets.leetcode.com/uploads/2020/01/30/sample_1_1709.png) +![](sample_1_1709.png) **Input:** root = [1,4,3,2,4,2,5,null,null,null,null,null,null,4,6] @@ -22,7 +22,7 @@ Assume a BST is defined as follows: **Example 2:** -![](https://assets.leetcode.com/uploads/2020/01/30/sample_2_1709.png) +![](sample_2_1709.png) **Input:** root = [4,3,null,1,2] diff --git a/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/sample_1_1709.png b/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/sample_1_1709.png new file mode 100644 index 000000000..1171afee9 Binary files /dev/null and b/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/sample_1_1709.png differ diff --git a/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/sample_2_1709.png b/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/sample_2_1709.png new file mode 100644 index 000000000..9332c66e8 Binary files /dev/null and b/src/main/java/g1301_1400/s1373_maximum_sum_bst_in_binary_tree/sample_2_1709.png differ diff --git a/src/main/java/g1301_1400/s1376_time_needed_to_inform_all_employees/graph.png b/src/main/java/g1301_1400/s1376_time_needed_to_inform_all_employees/graph.png new file mode 100644 index 000000000..21e760419 Binary files /dev/null and b/src/main/java/g1301_1400/s1376_time_needed_to_inform_all_employees/graph.png differ diff --git a/src/main/java/g1301_1400/s1376_time_needed_to_inform_all_employees/readme.md b/src/main/java/g1301_1400/s1376_time_needed_to_inform_all_employees/readme.md index 1d23f4935..dd917fb87 100644 --- a/src/main/java/g1301_1400/s1376_time_needed_to_inform_all_employees/readme.md +++ b/src/main/java/g1301_1400/s1376_time_needed_to_inform_all_employees/readme.md @@ -22,7 +22,7 @@ Return _the number of minutes_ needed to inform all the employees about the urge **Example 2:** -![](https://assets.leetcode.com/uploads/2020/02/27/graph.png) +![](graph.png) **Input:** n = 6, headID = 2, manager = [2,2,-1,2,2,2], informTime = [0,0,1,0,0,0] diff --git a/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/frog1.jpg b/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/frog1.jpg new file mode 100644 index 000000000..34f8db93f Binary files /dev/null and b/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/frog1.jpg differ diff --git a/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/frog2.jpg b/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/frog2.jpg new file mode 100644 index 000000000..6e7a52551 Binary files /dev/null and b/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/frog2.jpg differ diff --git a/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/readme.md b/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/readme.md index 2e664d093..dbb9caff5 100644 --- a/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/readme.md +++ b/src/main/java/g1301_1400/s1377_frog_position_after_t_seconds/readme.md @@ -10,7 +10,7 @@ _Return the probability that after `t` seconds the frog is on the vertex `target **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/21/frog1.jpg) +![](frog1.jpg) **Input:** n = 7, edges = [[1,2],[1,3],[1,7],[2,4],[2,6],[3,5]], t = 2, target = 4 @@ -20,7 +20,7 @@ _Return the probability that after `t` seconds the frog is on the vertex `target **Example 2:** -**![](https://assets.leetcode.com/uploads/2021/12/21/frog2.jpg)** +**![](frog2.jpg)** **Input:** n = 7, edges = [[1,2],[1,3],[1,7],[2,4],[2,6],[3,5]], t = 1, target = 7 diff --git a/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e1.png b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e1.png new file mode 100644 index 000000000..d05af3275 Binary files /dev/null and b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e1.png differ diff --git a/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e2.png b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e2.png new file mode 100644 index 000000000..86174321b Binary files /dev/null and b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e2.png differ diff --git a/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e3.png b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e3.png new file mode 100644 index 000000000..1224b15ab Binary files /dev/null and b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/e3.png differ diff --git a/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/readme.md b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/readme.md index 499cd5ab2..937a2d6e5 100644 --- a/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/readme.md +++ b/src/main/java/g1301_1400/s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree/readme.md @@ -12,7 +12,7 @@ Return _a reference to the same node_ in the `cloned` tree. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/21/e1.png) +![](e1.png) **Input:** tree = [7,4,3,null,null,6,19], target = 3 @@ -22,7 +22,7 @@ Return _a reference to the same node_ in the `cloned` tree. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/02/21/e2.png) +![](e2.png) **Input:** tree = [7], target = 7 @@ -30,7 +30,7 @@ Return _a reference to the same node_ in the `cloned` tree. **Example 3:** -![](https://assets.leetcode.com/uploads/2020/02/21/e3.png) +![](e3.png) **Input:** tree = [8,null,6,null,5,null,4,null,3,null,2,null,1], target = 4 diff --git a/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/balance1-tree.jpg b/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/balance1-tree.jpg new file mode 100644 index 000000000..dfd860a43 Binary files /dev/null and b/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/balance1-tree.jpg differ diff --git a/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/balanced2-tree.jpg b/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/balanced2-tree.jpg new file mode 100644 index 000000000..081231378 Binary files /dev/null and b/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/balanced2-tree.jpg differ diff --git a/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/readme.md b/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/readme.md index 0e333e1eb..42643da9c 100644 --- a/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/readme.md +++ b/src/main/java/g1301_1400/s1382_balance_a_binary_search_tree/readme.md @@ -8,7 +8,7 @@ A binary search tree is **balanced** if the depth of the two subtrees of every n **Example 1:** -![](https://assets.leetcode.com/uploads/2021/08/10/balance1-tree.jpg) +![](balance1-tree.jpg) **Input:** root = [1,null,2,null,3,null,4,null,null] @@ -18,7 +18,7 @@ A binary search tree is **balanced** if the depth of the two subtrees of every n **Example 2:** -![](https://assets.leetcode.com/uploads/2021/08/10/balanced2-tree.jpg) +![](balanced2-tree.jpg) **Input:** root = [2,1,3] diff --git a/src/main/java/g1301_1400/s1386_cinema_seat_allocation/cinema_seats_1.png b/src/main/java/g1301_1400/s1386_cinema_seat_allocation/cinema_seats_1.png new file mode 100644 index 000000000..5835268cb Binary files /dev/null and b/src/main/java/g1301_1400/s1386_cinema_seat_allocation/cinema_seats_1.png differ diff --git a/src/main/java/g1301_1400/s1386_cinema_seat_allocation/cinema_seats_3.png b/src/main/java/g1301_1400/s1386_cinema_seat_allocation/cinema_seats_3.png new file mode 100644 index 000000000..ce78dee4c Binary files /dev/null and b/src/main/java/g1301_1400/s1386_cinema_seat_allocation/cinema_seats_3.png differ diff --git a/src/main/java/g1301_1400/s1386_cinema_seat_allocation/readme.md b/src/main/java/g1301_1400/s1386_cinema_seat_allocation/readme.md index 3e9b43b3f..4794d6610 100644 --- a/src/main/java/g1301_1400/s1386_cinema_seat_allocation/readme.md +++ b/src/main/java/g1301_1400/s1386_cinema_seat_allocation/readme.md @@ -2,7 +2,7 @@ Medium -![](https://assets.leetcode.com/uploads/2020/02/14/cinema_seats_1.png) +![](cinema_seats_1.png) A cinema has `n` rows of seats, numbered from 1 to `n` and there are ten seats in each row, labelled from 1 to 10 as shown in the figure above. @@ -12,7 +12,7 @@ _Return the maximum number of four-person groups you can assign on the cinema se **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/14/cinema_seats_3.png) +![](cinema_seats_3.png) **Input:** n = 3, reservedSeats = [[1,2],[1,3],[1,8],[2,6],[3,1],[3,10]] diff --git a/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/readme.md b/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/readme.md index 5cceeeefe..316d14213 100644 --- a/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/readme.md +++ b/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/readme.md @@ -13,7 +13,7 @@ Given an integer array `slices` that represent the sizes of the pizza slices in **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/18/sample_3_1723.png) +![](sample_3_1723.png) **Input:** slices = [1,2,3,4,5,6] @@ -23,7 +23,7 @@ Given an integer array `slices` that represent the sizes of the pizza slices in **Example 2:** -![](https://assets.leetcode.com/uploads/2020/02/18/sample_4_1723.png) +![](sample_4_1723.png) **Input:** slices = [8,9,8,6,1,1] diff --git a/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/sample_3_1723.png b/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/sample_3_1723.png new file mode 100644 index 000000000..ad32e4fe0 Binary files /dev/null and b/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/sample_3_1723.png differ diff --git a/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/sample_4_1723.png b/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/sample_4_1723.png new file mode 100644 index 000000000..34e8bee83 Binary files /dev/null and b/src/main/java/g1301_1400/s1388_pizza_with_3n_slices/sample_4_1723.png differ diff --git a/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/e1.png b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/e1.png new file mode 100644 index 000000000..014fbcba1 Binary files /dev/null and b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/e1.png differ diff --git a/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/e2.png b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/e2.png new file mode 100644 index 000000000..f3855555e Binary files /dev/null and b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/e2.png differ diff --git a/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/main.png b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/main.png new file mode 100644 index 000000000..31d85c6d4 Binary files /dev/null and b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/main.png differ diff --git a/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/readme.md b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/readme.md index aed4f1aff..50b9720c4 100644 --- a/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/readme.md +++ b/src/main/java/g1301_1400/s1391_check_if_there_is_a_valid_path_in_a_grid/readme.md @@ -11,7 +11,7 @@ You are given an `m x n` `grid`. Each cell of `grid` represents a street. The st * `5` which means a street connecting the left cell and the upper cell. * `6` which means a street connecting the right cell and the upper cell. -![](https://assets.leetcode.com/uploads/2020/03/05/main.png) +![](main.png) You will initially start at the street of the upper-left cell `(0, 0)`. A valid path in the grid is a path that starts from the upper left cell `(0, 0)` and ends at the bottom-right cell `(m - 1, n - 1)`. **The path should only follow the streets**. @@ -21,7 +21,7 @@ Return `true` _if there is a valid path in the grid or_ `false` _otherwise_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/03/05/e1.png) +![](e1.png) **Input:** grid = [[2,4,3],[6,5,2]] @@ -31,7 +31,7 @@ Return `true` _if there is a valid path in the grid or_ `false` _otherwise_. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/03/05/e2.png) +![](e2.png) **Input:** grid = [[1,2,1],[1,2,1]] diff --git a/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/readme.md b/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/readme.md index f93c942e4..300e572f2 100644 --- a/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/readme.md +++ b/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/readme.md @@ -8,7 +8,7 @@ Return `true` _if the circle and rectangle are overlapped otherwise return_ `fal **Example 1:** -![](https://assets.leetcode.com/uploads/2020/02/20/sample_4_1728.png) +![](sample_4_1728.png) **Input:** radius = 1, xCenter = 0, yCenter = 0, x1 = 1, y1 = -1, x2 = 3, y2 = 1 @@ -24,7 +24,7 @@ Return `true` _if the circle and rectangle are overlapped otherwise return_ `fal **Example 3:** -![](https://assets.leetcode.com/uploads/2020/02/20/sample_2_1728.png) +![](sample_2_1728.png) **Input:** radius = 1, xCenter = 0, yCenter = 0, x1 = -1, y1 = 0, x2 = 0, y2 = 1 diff --git a/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/sample_2_1728.png b/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/sample_2_1728.png new file mode 100644 index 000000000..e92ff53da Binary files /dev/null and b/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/sample_2_1728.png differ diff --git a/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/sample_4_1728.png b/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/sample_4_1728.png new file mode 100644 index 000000000..c1fedf1dc Binary files /dev/null and b/src/main/java/g1401_1500/s1401_circle_and_rectangle_overlapping/sample_4_1728.png differ diff --git a/src/main/java/g1401_1500/s1411_number_of_ways_to_paint_n_3_grid/e1.png b/src/main/java/g1401_1500/s1411_number_of_ways_to_paint_n_3_grid/e1.png new file mode 100644 index 000000000..33b7e2a32 Binary files /dev/null and b/src/main/java/g1401_1500/s1411_number_of_ways_to_paint_n_3_grid/e1.png differ diff --git a/src/main/java/g1401_1500/s1411_number_of_ways_to_paint_n_3_grid/readme.md b/src/main/java/g1401_1500/s1411_number_of_ways_to_paint_n_3_grid/readme.md index 13c1de51b..60685fb69 100644 --- a/src/main/java/g1401_1500/s1411_number_of_ways_to_paint_n_3_grid/readme.md +++ b/src/main/java/g1401_1500/s1411_number_of_ways_to_paint_n_3_grid/readme.md @@ -8,7 +8,7 @@ Given `n` the number of rows of the grid, return _the number of ways_ you can pa **Example 1:** -![](https://assets.leetcode.com/uploads/2020/03/26/e1.png) +![](e1.png) **Input:** n = 1 diff --git a/src/main/java/g1401_1500/s1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons/e.png b/src/main/java/g1401_1500/s1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons/e.png new file mode 100644 index 000000000..da95a58c3 Binary files /dev/null and b/src/main/java/g1401_1500/s1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons/e.png differ diff --git a/src/main/java/g1401_1500/s1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons/readme.md b/src/main/java/g1401_1500/s1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons/readme.md index c5a156276..e742b8ae3 100644 --- a/src/main/java/g1401_1500/s1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons/readme.md +++ b/src/main/java/g1401_1500/s1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons/readme.md @@ -4,7 +4,7 @@ Hard You are given three integers `n`, `m` and `k`. Consider the following algorithm to find the maximum element of an array of positive integers: -![](https://assets.leetcode.com/uploads/2020/04/02/e.png) +![](e.png) You should build the array arr which has the following properties: diff --git a/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/readme.md b/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/readme.md index bf14c6846..707726b74 100644 --- a/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/readme.md +++ b/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/readme.md @@ -6,7 +6,7 @@ Given a 2D integer array `nums`, return _all elements of_ `nums` _in diagonal or **Example 1:** -![](https://assets.leetcode.com/uploads/2020/04/08/sample_1_1784.png) +![](sample_1_1784.png) **Input:** nums = [[1,2,3],[4,5,6],[7,8,9]] @@ -14,7 +14,7 @@ Given a 2D integer array `nums`, return _all elements of_ `nums` _in diagonal or **Example 2:** -![](https://assets.leetcode.com/uploads/2020/04/08/sample_2_1784.png) +![](sample_2_1784.png) **Input:** nums = [[1,2,3,4,5],[6,7],[8],[9,10,11],[12,13,14,15,16]] diff --git a/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/sample_1_1784.png b/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/sample_1_1784.png new file mode 100644 index 000000000..d69ba9329 Binary files /dev/null and b/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/sample_1_1784.png differ diff --git a/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/sample_2_1784.png b/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/sample_2_1784.png new file mode 100644 index 000000000..df183c3dd Binary files /dev/null and b/src/main/java/g1401_1500/s1424_diagonal_traverse_ii/sample_2_1784.png differ diff --git a/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/readme.md b/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/readme.md index 757e0cc6a..052a0b4cb 100644 --- a/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/readme.md +++ b/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/readme.md @@ -6,7 +6,7 @@ Given an binary array `nums` and an integer `k`, return `true` _if all_ `1`_'s a **Example 1:** -![](https://assets.leetcode.com/uploads/2020/04/15/sample_1_1791.png) +![](sample_1_1791.png) **Input:** nums = [1,0,0,0,1,0,0,1], k = 2 @@ -16,7 +16,7 @@ Given an binary array `nums` and an integer `k`, return `true` _if all_ `1`_'s a **Example 2:** -![](https://assets.leetcode.com/uploads/2020/04/15/sample_2_1791.png) +![](sample_2_1791.png) **Input:** nums = [1,0,0,1,0,1], k = 2 diff --git a/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/sample_1_1791.png b/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/sample_1_1791.png new file mode 100644 index 000000000..cb2c951cb Binary files /dev/null and b/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/sample_1_1791.png differ diff --git a/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/sample_2_1791.png b/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/sample_2_1791.png new file mode 100644 index 000000000..3e644f98a Binary files /dev/null and b/src/main/java/g1401_1500/s1437_check_if_all_1s_are_at_least_length_k_places_away/sample_2_1791.png differ diff --git a/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/min_time_collect_apple_1.png b/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/min_time_collect_apple_1.png new file mode 100644 index 000000000..479423b23 Binary files /dev/null and b/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/min_time_collect_apple_1.png differ diff --git a/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/min_time_collect_apple_2.png b/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/min_time_collect_apple_2.png new file mode 100644 index 000000000..a18be6986 Binary files /dev/null and b/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/min_time_collect_apple_2.png differ diff --git a/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/readme.md b/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/readme.md index 244f0c003..46ceecd1f 100644 --- a/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/readme.md +++ b/src/main/java/g1401_1500/s1443_minimum_time_to_collect_all_apples_in_a_tree/readme.md @@ -8,7 +8,7 @@ The edges of the undirected tree are given in the array `edges`, where edg **Example 1:** -![](https://assets.leetcode.com/uploads/2020/04/23/min_time_collect_apple_1.png) +![](min_time_collect_apple_1.png) **Input:** n = 7, edges = [[0,1],[0,2],[1,4],[1,5],[2,3],[2,6]], hasApple = [false,false,true,false,true,true,false] @@ -18,7 +18,7 @@ The edges of the undirected tree are given in the array `edges`, where edg **Example 2:** -![](https://assets.leetcode.com/uploads/2020/04/23/min_time_collect_apple_2.png) +![](min_time_collect_apple_2.png) **Input:** n = 7, edges = [[0,1],[0,2],[1,4],[1,5],[2,3],[2,6]], hasApple = [false,false,true,false,false,true,false] diff --git a/src/main/java/g1401_1500/s1444_number_of_ways_of_cutting_a_pizza/readme.md b/src/main/java/g1401_1500/s1444_number_of_ways_of_cutting_a_pizza/readme.md index cb9463504..fd9e5d7fe 100644 --- a/src/main/java/g1401_1500/s1444_number_of_ways_of_cutting_a_pizza/readme.md +++ b/src/main/java/g1401_1500/s1444_number_of_ways_of_cutting_a_pizza/readme.md @@ -10,7 +10,7 @@ _Return the number of ways of cutting the pizza such that each piece contains ** **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/04/23/ways_to_cut_apple_1.png)** +**![](ways_to_cut_apple_1.png)** **Input:** pizza = ["A..","AAA","..."], k = 3 diff --git a/src/main/java/g1401_1500/s1444_number_of_ways_of_cutting_a_pizza/ways_to_cut_apple_1.png b/src/main/java/g1401_1500/s1444_number_of_ways_of_cutting_a_pizza/ways_to_cut_apple_1.png new file mode 100644 index 000000000..36c073d39 Binary files /dev/null and b/src/main/java/g1401_1500/s1444_number_of_ways_of_cutting_a_pizza/ways_to_cut_apple_1.png differ diff --git a/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/readme.md b/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/readme.md index be10e5290..42daa2cf7 100644 --- a/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/readme.md +++ b/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/readme.md @@ -8,7 +8,7 @@ Return the number of **good** nodes in the binary tree. **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/04/02/test_sample_1.png)** +**![](test_sample_1.png)** **Input:** root = [3,1,4,3,null,1,5] @@ -26,7 +26,7 @@ Node 3 -> (3,1,3) is the maximum value in the path. **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/04/02/test_sample_2.png)** +**![](test_sample_2.png)** **Input:** root = [3,3,null,4,2] diff --git a/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/test_sample_1.png b/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/test_sample_1.png new file mode 100644 index 000000000..1108150d6 Binary files /dev/null and b/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/test_sample_1.png differ diff --git a/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/test_sample_2.png b/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/test_sample_2.png new file mode 100644 index 000000000..60a2c768c Binary files /dev/null and b/src/main/java/g1401_1500/s1448_count_good_nodes_in_binary_tree/test_sample_2.png differ diff --git a/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/readme.md b/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/readme.md index f2d51b0ca..bfc578165 100644 --- a/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/readme.md +++ b/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/readme.md @@ -10,7 +10,7 @@ Given the integer `r`, return _the maximum number of darts that can lie on the d **Example 1:** -![](https://assets.leetcode.com/uploads/2020/04/29/sample_1_1806.png) +![](sample_1_1806.png) **Input:** darts = [[-2,0],[2,0],[0,2],[0,-2]], r = 2 @@ -20,7 +20,7 @@ Given the integer `r`, return _the maximum number of darts that can lie on the d **Example 2:** -![](https://assets.leetcode.com/uploads/2020/04/29/sample_2_1806.png) +![](sample_2_1806.png) **Input:** darts = [[-3,0],[3,0],[2,6],[5,4],[0,9],[7,8]], r = 5 diff --git a/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/sample_1_1806.png b/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/sample_1_1806.png new file mode 100644 index 000000000..2635756f4 Binary files /dev/null and b/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/sample_1_1806.png differ diff --git a/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/sample_2_1806.png b/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/sample_2_1806.png new file mode 100644 index 000000000..9e4a171ff Binary files /dev/null and b/src/main/java/g1401_1500/s1453_maximum_number_of_darts_inside_of_a_circular_dartboard/sample_2_1806.png differ diff --git a/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/palindromic_paths_1.png b/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/palindromic_paths_1.png new file mode 100644 index 000000000..04ace7782 Binary files /dev/null and b/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/palindromic_paths_1.png differ diff --git a/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/palindromic_paths_2.png b/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/palindromic_paths_2.png new file mode 100644 index 000000000..920102d6b Binary files /dev/null and b/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/palindromic_paths_2.png differ diff --git a/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/readme.md b/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/readme.md index 0bd96e36f..973e26f35 100644 --- a/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/readme.md +++ b/src/main/java/g1401_1500/s1457_pseudo_palindromic_paths_in_a_binary_tree/readme.md @@ -8,7 +8,7 @@ _Return the number of **pseudo-palindromic** paths going from the root node to l **Example 1:** -![](https://assets.leetcode.com/uploads/2020/05/06/palindromic_paths_1.png) +![](palindromic_paths_1.png) **Input:** root = [2,3,1,3,1,null,1] @@ -18,7 +18,7 @@ _Return the number of **pseudo-palindromic** paths going from the root node to l **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/05/07/palindromic_paths_2.png)** +**![](palindromic_paths_2.png)** **Input:** root = [2,1,1,1,3,null,null,null,null,null,1] diff --git a/src/main/java/g1401_1500/s1462_course_schedule_iv/courses4-1-graph.jpg b/src/main/java/g1401_1500/s1462_course_schedule_iv/courses4-1-graph.jpg new file mode 100644 index 000000000..d05d2c436 Binary files /dev/null and b/src/main/java/g1401_1500/s1462_course_schedule_iv/courses4-1-graph.jpg differ diff --git a/src/main/java/g1401_1500/s1462_course_schedule_iv/courses4-3-graph.jpg b/src/main/java/g1401_1500/s1462_course_schedule_iv/courses4-3-graph.jpg new file mode 100644 index 000000000..21c168820 Binary files /dev/null and b/src/main/java/g1401_1500/s1462_course_schedule_iv/courses4-3-graph.jpg differ diff --git a/src/main/java/g1401_1500/s1462_course_schedule_iv/readme.md b/src/main/java/g1401_1500/s1462_course_schedule_iv/readme.md index 032009612..48dea3b1d 100644 --- a/src/main/java/g1401_1500/s1462_course_schedule_iv/readme.md +++ b/src/main/java/g1401_1500/s1462_course_schedule_iv/readme.md @@ -14,7 +14,7 @@ Return _a boolean array_ `answer`_, where_ `answer[j]` _is the answer to the_ positions[i] = [xi, yi[xcentre, ycentre] such that the following formula is minimized: -![](https://assets.leetcode.com/uploads/2020/06/25/q4_edited.jpg) +![](q4_edited.jpg) Answers within 10-5 of the actual value will be accepted. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/06/25/q4_e1.jpg) +![](q4_e1.jpg) **Input:** positions = [[0,1],[1,0],[1,2],[2,1]] @@ -24,7 +24,7 @@ Answers within 10-5 of the actual value will be accepted **Example 2:** -![](https://assets.leetcode.com/uploads/2020/06/25/q4_e3.jpg) +![](q4_e3.jpg) **Input:** positions = [[1,1],[3,3]] diff --git a/src/main/java/g1501_1600/s1518_water_bottles/readme.md b/src/main/java/g1501_1600/s1518_water_bottles/readme.md index f6d945ec2..ee5925aba 100644 --- a/src/main/java/g1501_1600/s1518_water_bottles/readme.md +++ b/src/main/java/g1501_1600/s1518_water_bottles/readme.md @@ -10,7 +10,7 @@ Given the two integers `numBottles` and `numExchange`, return _the **maximum** n **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/01/sample_1_1875.png) +![](sample_1_1875.png) **Input:** numBottles = 9, numExchange = 3 @@ -20,7 +20,7 @@ Given the two integers `numBottles` and `numExchange`, return _the **maximum** n **Example 2:** -![](https://assets.leetcode.com/uploads/2020/07/01/sample_2_1875.png) +![](sample_2_1875.png) **Input:** numBottles = 15, numExchange = 4 diff --git a/src/main/java/g1501_1600/s1518_water_bottles/sample_1_1875.png b/src/main/java/g1501_1600/s1518_water_bottles/sample_1_1875.png new file mode 100644 index 000000000..aab02d3db Binary files /dev/null and b/src/main/java/g1501_1600/s1518_water_bottles/sample_1_1875.png differ diff --git a/src/main/java/g1501_1600/s1518_water_bottles/sample_2_1875.png b/src/main/java/g1501_1600/s1518_water_bottles/sample_2_1875.png new file mode 100644 index 000000000..2c9a40997 Binary files /dev/null and b/src/main/java/g1501_1600/s1518_water_bottles/sample_2_1875.png differ diff --git a/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e1.jpg b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e1.jpg new file mode 100644 index 000000000..0e12a06f3 Binary files /dev/null and b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e1.jpg differ diff --git a/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e2.jpg b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e2.jpg new file mode 100644 index 000000000..1f00a1280 Binary files /dev/null and b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e2.jpg differ diff --git a/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e3.jpg b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e3.jpg new file mode 100644 index 000000000..508ac40e2 Binary files /dev/null and b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/q3e3.jpg differ diff --git a/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/readme.md b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/readme.md index c7529549b..c9ce3a772 100644 --- a/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/readme.md +++ b/src/main/java/g1501_1600/s1519_number_of_nodes_in_the_sub_tree_with_the_same_label/readme.md @@ -12,7 +12,7 @@ A subtree of a tree `T` is the tree consisting of a node in `T` and all of its d **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/01/q3e1.jpg) +![](q3e1.jpg) **Input:** n = 7, edges = [[0,1],[0,2],[1,4],[1,5],[2,3],[2,6]], labels = "abaedcd" @@ -24,7 +24,7 @@ Node 1 has a label 'b'. The sub-tree of node 1 contains nodes 1,4 and 5, as node **Example 2:** -![](https://assets.leetcode.com/uploads/2020/07/01/q3e2.jpg) +![](q3e2.jpg) **Input:** n = 4, edges = [[0,1],[1,2],[0,3]], labels = "bbbb" @@ -40,7 +40,7 @@ The sub-tree of node 0 contains nodes 0, 1, 2 and 3, all with label 'b', thus th **Example 3:** -![](https://assets.leetcode.com/uploads/2020/07/01/q3e3.jpg) +![](q3e3.jpg) **Input:** n = 5, edges = [[0,1],[0,2],[1,3],[0,4]], labels = "aabab" diff --git a/src/main/java/g1501_1600/s1521_find_a_value_of_a_mysterious_function_closest_to_target/change.png b/src/main/java/g1501_1600/s1521_find_a_value_of_a_mysterious_function_closest_to_target/change.png new file mode 100644 index 000000000..07a9b5cfd Binary files /dev/null and b/src/main/java/g1501_1600/s1521_find_a_value_of_a_mysterious_function_closest_to_target/change.png differ diff --git a/src/main/java/g1501_1600/s1521_find_a_value_of_a_mysterious_function_closest_to_target/readme.md b/src/main/java/g1501_1600/s1521_find_a_value_of_a_mysterious_function_closest_to_target/readme.md index e416f30f0..6d0cfc085 100644 --- a/src/main/java/g1501_1600/s1521_find_a_value_of_a_mysterious_function_closest_to_target/readme.md +++ b/src/main/java/g1501_1600/s1521_find_a_value_of_a_mysterious_function_closest_to_target/readme.md @@ -2,7 +2,7 @@ Hard -![](https://assets.leetcode.com/uploads/2020/07/09/change.png) +![](change.png) Winston was given the above mysterious function `func`. He has an integer array `arr` and an integer `target` and he wants to find the values `l` and `r` that make the value `|func(arr, l, r) - target|` minimum possible. diff --git a/src/main/java/g1501_1600/s1528_shuffle_string/q1.jpg b/src/main/java/g1501_1600/s1528_shuffle_string/q1.jpg new file mode 100644 index 000000000..19a965806 Binary files /dev/null and b/src/main/java/g1501_1600/s1528_shuffle_string/q1.jpg differ diff --git a/src/main/java/g1501_1600/s1528_shuffle_string/readme.md b/src/main/java/g1501_1600/s1528_shuffle_string/readme.md index 742a34efd..429c25f71 100644 --- a/src/main/java/g1501_1600/s1528_shuffle_string/readme.md +++ b/src/main/java/g1501_1600/s1528_shuffle_string/readme.md @@ -8,7 +8,7 @@ Return _the shuffled string_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/09/q1.jpg) +![](q1.jpg) **Input:** s = "codeleet", `indices` = [4,5,6,7,0,2,1,3] diff --git a/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/e1.jpg b/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/e1.jpg new file mode 100644 index 000000000..1040880d4 Binary files /dev/null and b/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/e1.jpg differ diff --git a/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/e2.jpg b/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/e2.jpg new file mode 100644 index 000000000..4d6f04c55 Binary files /dev/null and b/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/e2.jpg differ diff --git a/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/readme.md b/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/readme.md index 34b12f4a8..6e4eaf3c8 100644 --- a/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/readme.md +++ b/src/main/java/g1501_1600/s1530_number_of_good_leaf_nodes_pairs/readme.md @@ -8,7 +8,7 @@ Return _the number of good leaf node pairs_ in the tree. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/09/e1.jpg) +![](e1.jpg) **Input:** root = [1,2,3,null,4], distance = 3 @@ -18,7 +18,7 @@ Return _the number of good leaf node pairs_ in the tree. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/07/09/e2.jpg) +![](e2.jpg) **Input:** root = [1,2,3,4,5,6,7], distance = 3 diff --git a/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/e2.jpg b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/e2.jpg new file mode 100644 index 000000000..5c6c983f7 Binary files /dev/null and b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/e2.jpg differ diff --git a/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/e3.jpg b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/e3.jpg new file mode 100644 index 000000000..3e83e583e Binary files /dev/null and b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/e3.jpg differ diff --git a/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/fw.jpg b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/fw.jpg new file mode 100644 index 000000000..0b432f527 Binary files /dev/null and b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/fw.jpg differ diff --git a/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/readme.md b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/readme.md index 4440ae1a0..0b9e7bbd8 100644 --- a/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/readme.md +++ b/src/main/java/g1501_1600/s1536_minimum_swaps_to_arrange_a_binary_grid/readme.md @@ -12,7 +12,7 @@ The main diagonal of a grid is the diagonal that starts at cell `(1, 1)` and end **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/28/fw.jpg) +![](fw.jpg) **Input:** grid = [[0,0,1],[1,1,0],[1,0,0]] @@ -20,7 +20,7 @@ The main diagonal of a grid is the diagonal that starts at cell `(1, 1)` and end **Example 2:** -![](https://assets.leetcode.com/uploads/2020/07/16/e2.jpg) +![](e2.jpg) **Input:** grid = [[0,1,1,0],[0,1,1,0],[0,1,1,0],[0,1,1,0]] @@ -30,7 +30,7 @@ The main diagonal of a grid is the diagonal that starts at cell `(1, 1)` and end **Example 3:** -![](https://assets.leetcode.com/uploads/2020/07/16/e3.jpg) +![](e3.jpg) **Input:** grid = [[1,0,0],[1,1,0],[1,1,1]] diff --git a/src/main/java/g1501_1600/s1537_get_the_maximum_score/readme.md b/src/main/java/g1501_1600/s1537_get_the_maximum_score/readme.md index d82554496..c50f1bae5 100644 --- a/src/main/java/g1501_1600/s1537_get_the_maximum_score/readme.md +++ b/src/main/java/g1501_1600/s1537_get_the_maximum_score/readme.md @@ -16,7 +16,7 @@ Return _the maximum score you can obtain of all possible **valid paths**_. Since **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/16/sample_1_1893.png) +![](sample_1_1893.png) **Input:** nums1 = [2,4,5,8,10], nums2 = [4,6,8,9] diff --git a/src/main/java/g1501_1600/s1537_get_the_maximum_score/sample_1_1893.png b/src/main/java/g1501_1600/s1537_get_the_maximum_score/sample_1_1893.png new file mode 100644 index 000000000..75f16fc7e Binary files /dev/null and b/src/main/java/g1501_1600/s1537_get_the_maximum_score/sample_1_1893.png differ diff --git a/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/e1.jpg b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/e1.jpg new file mode 100644 index 000000000..ff7f456d2 Binary files /dev/null and b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/e1.jpg differ diff --git a/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/e11.jpg b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/e11.jpg new file mode 100644 index 000000000..77deeed64 Binary files /dev/null and b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/e11.jpg differ diff --git a/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/readme.md b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/readme.md index b8f8fa220..a01a71fcb 100644 --- a/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/readme.md +++ b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/readme.md @@ -4,7 +4,7 @@ Hard Given a wooden stick of length `n` units. The stick is labelled from `0` to `n`. For example, a stick of length **6** is labelled as follows: -![](https://assets.leetcode.com/uploads/2020/07/21/statement.jpg) +![](statement.jpg) Given an integer array `cuts` where `cuts[i]` denotes a position you should perform a cut at. @@ -16,13 +16,13 @@ Return _the minimum total cost_ of the cuts. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/23/e1.jpg) +![](e1.jpg) **Input:** n = 7, cuts = [1,3,4,5] **Output:** 16 -**Explanation:** Using cuts order = [1, 3, 4, 5] as in the input leads to the following scenario: ![](https://assets.leetcode.com/uploads/2020/07/21/e11.jpg) +**Explanation:** Using cuts order = [1, 3, 4, 5] as in the input leads to the following scenario: ![](e11.jpg) The first cut is done to a rod of length 7 so the cost is 7. The second cut is done to a rod of length 6 (i.e. the second part of the first cut), the third is done to a rod of length 4 and the last cut is to a rod of length 3. diff --git a/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/statement.jpg b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/statement.jpg new file mode 100644 index 000000000..70e9b58c7 Binary files /dev/null and b/src/main/java/g1501_1600/s1547_minimum_cost_to_cut_a_stick/statement.jpg differ diff --git a/src/main/java/g1501_1600/s1552_magnetic_force_between_two_balls/q3v1.jpg b/src/main/java/g1501_1600/s1552_magnetic_force_between_two_balls/q3v1.jpg new file mode 100644 index 000000000..a81c0ebb0 Binary files /dev/null and b/src/main/java/g1501_1600/s1552_magnetic_force_between_two_balls/q3v1.jpg differ diff --git a/src/main/java/g1501_1600/s1552_magnetic_force_between_two_balls/readme.md b/src/main/java/g1501_1600/s1552_magnetic_force_between_two_balls/readme.md index d24b6ea75..867b5dd89 100644 --- a/src/main/java/g1501_1600/s1552_magnetic_force_between_two_balls/readme.md +++ b/src/main/java/g1501_1600/s1552_magnetic_force_between_two_balls/readme.md @@ -10,7 +10,7 @@ Given the integer array `position` and the integer `m`. Return _the required for **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/11/q3v1.jpg) +![](q3v1.jpg) **Input:** position = [1,2,3,4,7], m = 3 diff --git a/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/readme.md b/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/readme.md index f8334233b..784a3e98a 100644 --- a/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/readme.md +++ b/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/readme.md @@ -10,7 +10,7 @@ Notice that you can return the vertices in any order. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/07/07/untitled22.png) +![](untitled22.png) **Input:** n = 6, edges = [[0,1],[0,2],[2,5],[3,4],[4,2]] @@ -20,7 +20,7 @@ Notice that you can return the vertices in any order. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/07/07/untitled.png) +![](untitled.png) **Input:** n = 5, edges = [[0,1],[2,1],[3,1],[1,4],[2,4]] diff --git a/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/untitled.png b/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/untitled.png new file mode 100644 index 000000000..2e702b55b Binary files /dev/null and b/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/untitled.png differ diff --git a/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/untitled22.png b/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/untitled22.png new file mode 100644 index 000000000..53db69aa7 Binary files /dev/null and b/src/main/java/g1501_1600/s1557_minimum_number_of_vertices_to_reach_all_nodes/untitled22.png differ diff --git a/src/main/java/g1501_1600/s1558_minimum_numbers_of_function_calls_to_make_target_array/readme.md b/src/main/java/g1501_1600/s1558_minimum_numbers_of_function_calls_to_make_target_array/readme.md index 3842febfe..ad328365f 100644 --- a/src/main/java/g1501_1600/s1558_minimum_numbers_of_function_calls_to_make_target_array/readme.md +++ b/src/main/java/g1501_1600/s1558_minimum_numbers_of_function_calls_to_make_target_array/readme.md @@ -4,7 +4,7 @@ Medium You are given an integer array `nums`. You have an integer array `arr` of the same length with all values set to `0` initially. You also have the following `modify` function: -![](https://assets.leetcode.com/uploads/2020/07/10/sample_2_1887.png) +![](sample_2_1887.png) You want to use the modify function to covert `arr` to `nums` using the minimum number of calls. diff --git a/src/main/java/g1501_1600/s1558_minimum_numbers_of_function_calls_to_make_target_array/sample_2_1887.png b/src/main/java/g1501_1600/s1558_minimum_numbers_of_function_calls_to_make_target_array/sample_2_1887.png new file mode 100644 index 000000000..8406c5898 Binary files /dev/null and b/src/main/java/g1501_1600/s1558_minimum_numbers_of_function_calls_to_make_target_array/sample_2_1887.png differ diff --git a/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/1.png b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/1.png new file mode 100644 index 000000000..090fabd20 Binary files /dev/null and b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/1.png differ diff --git a/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/11.png b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/11.png new file mode 100644 index 000000000..5df1e28a1 Binary files /dev/null and b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/11.png differ diff --git a/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/2.png b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/2.png new file mode 100644 index 000000000..ada223147 Binary files /dev/null and b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/2.png differ diff --git a/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/22.png b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/22.png new file mode 100644 index 000000000..acd86af53 Binary files /dev/null and b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/22.png differ diff --git a/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/3.png b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/3.png new file mode 100644 index 000000000..4842f3d41 Binary files /dev/null and b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/3.png differ diff --git a/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/readme.md b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/readme.md index 96957d643..02a64b2fd 100644 --- a/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/readme.md +++ b/src/main/java/g1501_1600/s1559_detect_cycles_in_2d_grid/readme.md @@ -12,27 +12,27 @@ Return `true` if any cycle of the same value exists in `grid`, otherwise, return **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/07/15/1.png)** +**![](1.png)** **Input:** grid = [["a","a","a","a"],["a","b","b","a"],["a","b","b","a"],["a","a","a","a"]] **Output:** true -**Explanation:** There are two valid cycles shown in different colors in the image below: ![](https://assets.leetcode.com/uploads/2020/07/15/11.png) +**Explanation:** There are two valid cycles shown in different colors in the image below: ![](11.png) **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/07/15/22.png)** +**![](22.png)** **Input:** grid = [["c","c","c","a"],["c","d","c","c"],["c","c","e","c"],["f","c","c","c"]] **Output:** true -**Explanation:** There is only one valid cycle highlighted in the image below: ![](https://assets.leetcode.com/uploads/2020/07/15/2.png) +**Explanation:** There is only one valid cycle highlighted in the image below: ![](2.png) **Example 3:** -**![](https://assets.leetcode.com/uploads/2020/07/15/3.png)** +**![](3.png)** **Input:** grid = [["a","b","b"],["b","z","b"],["b","b","a"]] diff --git a/src/main/java/g1501_1600/s1560_most_visited_sector_in_a_circular_track/readme.md b/src/main/java/g1501_1600/s1560_most_visited_sector_in_a_circular_track/readme.md index ad2317786..ab6852bc7 100644 --- a/src/main/java/g1501_1600/s1560_most_visited_sector_in_a_circular_track/readme.md +++ b/src/main/java/g1501_1600/s1560_most_visited_sector_in_a_circular_track/readme.md @@ -10,7 +10,7 @@ Notice that you circulate the track in ascending order of sector numbers in the **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/14/tmp.jpg) +![](tmp.jpg) **Input:** n = 4, rounds = [1,3,1,2] diff --git a/src/main/java/g1501_1600/s1560_most_visited_sector_in_a_circular_track/tmp.jpg b/src/main/java/g1501_1600/s1560_most_visited_sector_in_a_circular_track/tmp.jpg new file mode 100644 index 000000000..f4cf17ad9 Binary files /dev/null and b/src/main/java/g1501_1600/s1560_most_visited_sector_in_a_circular_track/tmp.jpg differ diff --git a/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/land1.jpg b/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/land1.jpg new file mode 100644 index 000000000..3c8edd76d Binary files /dev/null and b/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/land1.jpg differ diff --git a/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/land2.jpg b/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/land2.jpg new file mode 100644 index 000000000..54aa125cb Binary files /dev/null and b/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/land2.jpg differ diff --git a/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/readme.md b/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/readme.md index 2a34c2110..2b20d4ea2 100644 --- a/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/readme.md +++ b/src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/readme.md @@ -12,7 +12,7 @@ Return _the minimum number of days to disconnect the grid_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/24/land1.jpg) +![](land1.jpg) **Input:** grid = [[0,1,1,0],[0,1,1,0],[0,0,0,0]] @@ -22,7 +22,7 @@ Return _the minimum number of days to disconnect the grid_. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/24/land2.jpg) +![](land2.jpg) **Input:** grid = [[1,1]] diff --git a/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/bb.png b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/bb.png new file mode 100644 index 000000000..3378de18a Binary files /dev/null and b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/bb.png differ diff --git a/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/ex1.png b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/ex1.png new file mode 100644 index 000000000..1ff370d18 Binary files /dev/null and b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/ex1.png differ diff --git a/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/ex4.png b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/ex4.png new file mode 100644 index 000000000..5aba73fa9 Binary files /dev/null and b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/ex4.png differ diff --git a/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/readme.md b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/readme.md index 5d0125a4e..332205ff4 100644 --- a/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/readme.md +++ b/src/main/java/g1501_1600/s1569_number_of_ways_to_reorder_array_to_get_same_bst/readme.md @@ -12,7 +12,7 @@ Since the answer may be very large, **return it modulo** 109 + **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/12/bb.png) +![](bb.png) **Input:** nums = [2,1,3] @@ -22,7 +22,7 @@ Since the answer may be very large, **return it modulo** 109 + **Example 2:** -![](https://assets.leetcode.com/uploads/2020/08/12/ex1.png) +![](ex1.png) **Input:** nums = [3,4,5,1,2] @@ -38,7 +38,7 @@ Since the answer may be very large, **return it modulo** 109 + **Example 3:** -![](https://assets.leetcode.com/uploads/2020/08/12/ex4.png) +![](ex4.png) **Input:** nums = [1,2,3] diff --git a/src/main/java/g1501_1600/s1572_matrix_diagonal_sum/readme.md b/src/main/java/g1501_1600/s1572_matrix_diagonal_sum/readme.md index 8f230b6fb..ca972fe6a 100644 --- a/src/main/java/g1501_1600/s1572_matrix_diagonal_sum/readme.md +++ b/src/main/java/g1501_1600/s1572_matrix_diagonal_sum/readme.md @@ -8,7 +8,7 @@ Only include the sum of all the elements on the primary diagonal and all the ele **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/14/sample_1911.png) +![](sample_1911.png) **Input:** mat = [[**1**,2,**3**], [4,**5**,6], diff --git a/src/main/java/g1501_1600/s1572_matrix_diagonal_sum/sample_1911.png b/src/main/java/g1501_1600/s1572_matrix_diagonal_sum/sample_1911.png new file mode 100644 index 000000000..96e64c60f Binary files /dev/null and b/src/main/java/g1501_1600/s1572_matrix_diagonal_sum/sample_1911.png differ diff --git a/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/ballon1.jpg b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/ballon1.jpg new file mode 100644 index 000000000..d1f01a8d1 Binary files /dev/null and b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/ballon1.jpg differ diff --git a/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/balloon2.jpg b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/balloon2.jpg new file mode 100644 index 000000000..b843e68fd Binary files /dev/null and b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/balloon2.jpg differ diff --git a/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/balloon3.jpg b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/balloon3.jpg new file mode 100644 index 000000000..2fd399041 Binary files /dev/null and b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/balloon3.jpg differ diff --git a/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/readme.md b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/readme.md index 4c87aec94..411562bb1 100644 --- a/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/readme.md +++ b/src/main/java/g1501_1600/s1578_minimum_time_to_make_rope_colorful/readme.md @@ -10,7 +10,7 @@ Return _the **minimum time** Bob needs to make the rope **colorful**_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/13/ballon1.jpg) +![](ballon1.jpg) **Input:** colors = "abaac", neededTime = [1,2,3,4,5] @@ -24,7 +24,7 @@ There are no longer two consecutive balloons of the same color. Total time = 3. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/13/balloon2.jpg) +![](balloon2.jpg) **Input:** colors = "abc", neededTime = [1,2,3] @@ -34,7 +34,7 @@ There are no longer two consecutive balloons of the same color. Total time = 3. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/12/13/balloon3.jpg) +![](balloon3.jpg) **Input:** colors = "aabaa", neededTime = [1,2,3,4,1] diff --git a/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex1.png b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex1.png new file mode 100644 index 000000000..40ea5cadd Binary files /dev/null and b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex1.png differ diff --git a/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex2.png b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex2.png new file mode 100644 index 000000000..bfde27e7d Binary files /dev/null and b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex2.png differ diff --git a/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex3.png b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex3.png new file mode 100644 index 000000000..5b557aa76 Binary files /dev/null and b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/ex3.png differ diff --git a/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/readme.md b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/readme.md index 68db66734..3cf4fc328 100644 --- a/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/readme.md +++ b/src/main/java/g1501_1600/s1579_remove_max_number_of_edges_to_keep_graph_fully_traversable/readme.md @@ -14,7 +14,7 @@ Return _the maximum number of edges you can remove, or return_ `-1` _if it's imp **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/08/19/ex1.png)** +**![](ex1.png)** **Input:** n = 4, edges = [[3,1,2],[3,2,3],[1,1,3],[1,2,4],[1,1,2],[2,3,4]] @@ -24,7 +24,7 @@ Return _the maximum number of edges you can remove, or return_ `-1` _if it's imp **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/08/19/ex2.png)** +**![](ex2.png)** **Input:** n = 4, edges = [[3,1,2],[3,2,3],[1,1,4],[2,1,4]] @@ -34,7 +34,7 @@ Return _the maximum number of edges you can remove, or return_ `-1` _if it's imp **Example 3:** -**![](https://assets.leetcode.com/uploads/2020/08/19/ex3.png)** +**![](ex3.png)** **Input:** n = 4, edges = [[3,2,3],[1,1,2],[2,3,4]] diff --git a/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/readme.md b/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/readme.md index e73619ff2..6448a942b 100644 --- a/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/readme.md +++ b/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/readme.md @@ -8,7 +8,7 @@ A position `(i, j)` is called **special** if `mat[i][j] == 1` and all other elem **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/23/special1.jpg) +![](special1.jpg) **Input:** mat = [[1,0,0],[0,0,1],[1,0,0]] @@ -18,7 +18,7 @@ A position `(i, j)` is called **special** if `mat[i][j] == 1` and all other elem **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/24/special-grid.jpg) +![](special-grid.jpg) **Input:** mat = [[1,0,0],[0,1,0],[0,0,1]] diff --git a/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/special-grid.jpg b/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/special-grid.jpg new file mode 100644 index 000000000..0dac5c8df Binary files /dev/null and b/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/special-grid.jpg differ diff --git a/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/special1.jpg b/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/special1.jpg new file mode 100644 index 000000000..824c482bb Binary files /dev/null and b/src/main/java/g1501_1600/s1582_special_positions_in_a_binary_matrix/special1.jpg differ diff --git a/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/c.png b/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/c.png new file mode 100644 index 000000000..682772d5f Binary files /dev/null and b/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/c.png differ diff --git a/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/d.png b/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/d.png new file mode 100644 index 000000000..e11160d23 Binary files /dev/null and b/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/d.png differ diff --git a/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/readme.md b/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/readme.md index aed27bb0c..9439e309c 100644 --- a/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/readme.md +++ b/src/main/java/g1501_1600/s1584_min_cost_to_connect_all_points/readme.md @@ -10,13 +10,13 @@ Return _the minimum cost to make all points connected._ All points are connected **Example 1:** -![](https://assets.leetcode.com/uploads/2020/08/26/d.png) +![](d.png) **Input:** points = [[0,0],[2,2],[3,10],[5,2],[7,0]] **Output:** 20 -**Explanation:** ![](https://assets.leetcode.com/uploads/2020/08/26/c.png) +**Explanation:** ![](c.png) We can connect the points as shown above to get the minimum cost of 20. diff --git a/src/main/java/g1501_1600/s1591_strange_printer_ii/print1.jpg b/src/main/java/g1501_1600/s1591_strange_printer_ii/print1.jpg new file mode 100644 index 000000000..07ca5c1ea Binary files /dev/null and b/src/main/java/g1501_1600/s1591_strange_printer_ii/print1.jpg differ diff --git a/src/main/java/g1501_1600/s1591_strange_printer_ii/print2.jpg b/src/main/java/g1501_1600/s1591_strange_printer_ii/print2.jpg new file mode 100644 index 000000000..25b1fef30 Binary files /dev/null and b/src/main/java/g1501_1600/s1591_strange_printer_ii/print2.jpg differ diff --git a/src/main/java/g1501_1600/s1591_strange_printer_ii/readme.md b/src/main/java/g1501_1600/s1591_strange_printer_ii/readme.md index 361394369..3f1bfcc1a 100644 --- a/src/main/java/g1501_1600/s1591_strange_printer_ii/readme.md +++ b/src/main/java/g1501_1600/s1591_strange_printer_ii/readme.md @@ -13,7 +13,7 @@ Return `true` _if it is possible to print the matrix_ `targetGrid`_,_ _otherwise **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/23/print1.jpg) +![](print1.jpg) **Input:** targetGrid = [[1,1,1,1],[1,2,2,1],[1,2,2,1],[1,1,1,1]] @@ -21,7 +21,7 @@ Return `true` _if it is possible to print the matrix_ `targetGrid`_,_ _otherwise **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/23/print2.jpg) +![](print2.jpg) **Input:** targetGrid = [[1,1,1,1],[1,1,3,3],[1,1,3,4],[5,5,1,4]] diff --git a/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product1.jpg b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product1.jpg new file mode 100644 index 000000000..b86b7d156 Binary files /dev/null and b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product1.jpg differ diff --git a/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product2.jpg b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product2.jpg new file mode 100644 index 000000000..d5623df34 Binary files /dev/null and b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product2.jpg differ diff --git a/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product3.jpg b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product3.jpg new file mode 100644 index 000000000..29b22f1ed Binary files /dev/null and b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/product3.jpg differ diff --git a/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/readme.md b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/readme.md index 9c7600141..642de0093 100644 --- a/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/readme.md +++ b/src/main/java/g1501_1600/s1594_maximum_non_negative_product_in_a_matrix/readme.md @@ -12,7 +12,7 @@ Notice that the modulo is performed after getting the maximum product. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/23/product1.jpg) +![](product1.jpg) **Input:** grid = [[-1,-2,-3],[-2,-3,-3],[-3,-3,-2]] @@ -22,7 +22,7 @@ Notice that the modulo is performed after getting the maximum product. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/23/product2.jpg) +![](product2.jpg) **Input:** grid = [[1,-2,1],[1,-2,1],[3,-4,1]] @@ -32,7 +32,7 @@ Notice that the modulo is performed after getting the maximum product. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/12/23/product3.jpg) +![](product3.jpg) **Input:** grid = [[1,3],[0,-4]] diff --git a/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/ex1.jpg b/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/ex1.jpg new file mode 100644 index 000000000..04211685c Binary files /dev/null and b/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/ex1.jpg differ diff --git a/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/ex2.jpg b/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/ex2.jpg new file mode 100644 index 000000000..323ed9e85 Binary files /dev/null and b/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/ex2.jpg differ diff --git a/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/readme.md b/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/readme.md index 068ab27a2..cdc431540 100644 --- a/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/readme.md +++ b/src/main/java/g1501_1600/s1595_minimum_cost_to_connect_two_groups_of_points/readme.md @@ -10,7 +10,7 @@ Return _the minimum cost it takes to connect the two groups_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/03/ex1.jpg) +![](ex1.jpg) **Input:** cost = [[15, 96], [36, 2]] @@ -26,7 +26,7 @@ This results in a total cost of 17. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/03/ex2.jpg) +![](ex2.jpg) **Input:** cost = [[1, 3, 5], [4, 1, 1], [1, 5, 3]] diff --git a/src/main/java/g1501_1600/s1598_crawler_log_folder/readme.md b/src/main/java/g1501_1600/s1598_crawler_log_folder/readme.md index 863cc0b5b..3fb61b145 100644 --- a/src/main/java/g1501_1600/s1598_crawler_log_folder/readme.md +++ b/src/main/java/g1501_1600/s1598_crawler_log_folder/readme.md @@ -18,7 +18,7 @@ Return _the minimum number of operations needed to go back to the main folder af **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/09/sample_11_1957.png) +![](sample_11_1957.png) **Input:** logs = ["d1/","d2/","../","d21/","./"] @@ -28,7 +28,7 @@ Return _the minimum number of operations needed to go back to the main folder af **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/09/sample_22_1957.png) +![](sample_22_1957.png) **Input:** logs = ["d1/","d2/","./","d3/","../","d31/"] diff --git a/src/main/java/g1501_1600/s1598_crawler_log_folder/sample_11_1957.png b/src/main/java/g1501_1600/s1598_crawler_log_folder/sample_11_1957.png new file mode 100644 index 000000000..c428cc71b Binary files /dev/null and b/src/main/java/g1501_1600/s1598_crawler_log_folder/sample_11_1957.png differ diff --git a/src/main/java/g1501_1600/s1598_crawler_log_folder/sample_22_1957.png b/src/main/java/g1501_1600/s1598_crawler_log_folder/sample_22_1957.png new file mode 100644 index 000000000..2d7ef62e3 Binary files /dev/null and b/src/main/java/g1501_1600/s1598_crawler_log_folder/sample_22_1957.png differ diff --git a/src/main/java/g1501_1600/s1599_maximum_profit_of_operating_a_centennial_wheel/readme.md b/src/main/java/g1501_1600/s1599_maximum_profit_of_operating_a_centennial_wheel/readme.md index 419920824..0e6311cac 100644 --- a/src/main/java/g1501_1600/s1599_maximum_profit_of_operating_a_centennial_wheel/readme.md +++ b/src/main/java/g1501_1600/s1599_maximum_profit_of_operating_a_centennial_wheel/readme.md @@ -12,7 +12,7 @@ Return _the minimum number of rotations you need to perform to maximize your pro **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/09/wheeldiagram12.png) +![](wheeldiagram12.png) **Input:** customers = [8,3], boardingCost = 5, runningCost = 6 diff --git a/src/main/java/g1501_1600/s1599_maximum_profit_of_operating_a_centennial_wheel/wheeldiagram12.png b/src/main/java/g1501_1600/s1599_maximum_profit_of_operating_a_centennial_wheel/wheeldiagram12.png new file mode 100644 index 000000000..bf5c35581 Binary files /dev/null and b/src/main/java/g1501_1600/s1599_maximum_profit_of_operating_a_centennial_wheel/wheeldiagram12.png differ diff --git a/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/move1.jpg b/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/move1.jpg new file mode 100644 index 000000000..0c397190b Binary files /dev/null and b/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/move1.jpg differ diff --git a/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/move2.jpg b/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/move2.jpg new file mode 100644 index 000000000..f3ada3a31 Binary files /dev/null and b/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/move2.jpg differ diff --git a/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/readme.md b/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/readme.md index 437be68a0..b13322b15 100644 --- a/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/readme.md +++ b/src/main/java/g1601_1700/s1601_maximum_number_of_achievable_transfer_requests/readme.md @@ -12,7 +12,7 @@ Return _the maximum number of achievable requests_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/10/move1.jpg) +![](move1.jpg) **Input:** n = 5, requests = [[0,1],[1,0],[0,1],[1,2],[2,0],[3,4]] @@ -34,7 +34,7 @@ We can achieve the requests of users y, a and z by swapping the places in the 3 **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/10/move2.jpg) +![](move2.jpg) **Input:** n = 3, requests = [[0,0],[1,2],[2,1]] diff --git a/src/main/java/g1601_1700/s1606_find_servers_that_handled_most_number_of_requests/load-1.png b/src/main/java/g1601_1700/s1606_find_servers_that_handled_most_number_of_requests/load-1.png new file mode 100644 index 000000000..ac8524b03 Binary files /dev/null and b/src/main/java/g1601_1700/s1606_find_servers_that_handled_most_number_of_requests/load-1.png differ diff --git a/src/main/java/g1601_1700/s1606_find_servers_that_handled_most_number_of_requests/readme.md b/src/main/java/g1601_1700/s1606_find_servers_that_handled_most_number_of_requests/readme.md index 03640d874..77f094ea8 100644 --- a/src/main/java/g1601_1700/s1606_find_servers_that_handled_most_number_of_requests/readme.md +++ b/src/main/java/g1601_1700/s1606_find_servers_that_handled_most_number_of_requests/readme.md @@ -15,7 +15,7 @@ Return _a list containing the IDs (0-indexed) of the **busiest server(s)**_. You **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/08/load-1.png) +![](load-1.png) **Input:** k = 3, arrival = [1,2,3,4,5], load = [5,2,3,3,3] diff --git a/src/main/java/g1601_1700/s1609_even_odd_tree/readme.md b/src/main/java/g1601_1700/s1609_even_odd_tree/readme.md index 0dda3a506..710ed7fee 100644 --- a/src/main/java/g1601_1700/s1609_even_odd_tree/readme.md +++ b/src/main/java/g1601_1700/s1609_even_odd_tree/readme.md @@ -12,7 +12,7 @@ Given the `root` of a binary tree, _return_ `true` _if the binary tree is **Even **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/15/sample_1_1966.png) +![](sample_1_1966.png) **Input:** root = [1,10,4,3,null,7,9,12,8,6,null,null,2] @@ -32,7 +32,7 @@ Since levels 0 and 2 are all odd and increasing and levels 1 and 3 are all even **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/15/sample_2_1966.png) +![](sample_2_1966.png) **Input:** root = [5,4,2,3,3,7] @@ -50,7 +50,7 @@ Node values in level 2 must be in strictly increasing order, so the tree is not **Example 3:** -![](https://assets.leetcode.com/uploads/2020/09/22/sample_1_333_1966.png) +![](sample_1_333_1966.png) **Input:** root = [5,9,1,3,5,7] diff --git a/src/main/java/g1601_1700/s1609_even_odd_tree/sample_1_1966.png b/src/main/java/g1601_1700/s1609_even_odd_tree/sample_1_1966.png new file mode 100644 index 000000000..20db22511 Binary files /dev/null and b/src/main/java/g1601_1700/s1609_even_odd_tree/sample_1_1966.png differ diff --git a/src/main/java/g1601_1700/s1609_even_odd_tree/sample_1_333_1966.png b/src/main/java/g1601_1700/s1609_even_odd_tree/sample_1_333_1966.png new file mode 100644 index 000000000..7ef661118 Binary files /dev/null and b/src/main/java/g1601_1700/s1609_even_odd_tree/sample_1_333_1966.png differ diff --git a/src/main/java/g1601_1700/s1609_even_odd_tree/sample_2_1966.png b/src/main/java/g1601_1700/s1609_even_odd_tree/sample_2_1966.png new file mode 100644 index 000000000..772a9dc4f Binary files /dev/null and b/src/main/java/g1601_1700/s1609_even_odd_tree/sample_2_1966.png differ diff --git a/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/5010bfd3-86e6-465f-ac64-e9df941d2e49.png b/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/5010bfd3-86e6-465f-ac64-e9df941d2e49.png new file mode 100644 index 000000000..e15a6bb06 Binary files /dev/null and b/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/5010bfd3-86e6-465f-ac64-e9df941d2e49.png differ diff --git a/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/89a07e9b-00ab-4967-976a-c723b2aa8656.png b/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/89a07e9b-00ab-4967-976a-c723b2aa8656.png new file mode 100644 index 000000000..e8bc82fb4 Binary files /dev/null and b/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/89a07e9b-00ab-4967-976a-c723b2aa8656.png differ diff --git a/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/readme.md b/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/readme.md index 909ee7c1b..604176194 100644 --- a/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/readme.md +++ b/src/main/java/g1601_1700/s1610_maximum_number_of_visible_points/readme.md @@ -16,7 +16,7 @@ Return _the maximum number of points you can see_. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/30/89a07e9b-00ab-4967-976a-c723b2aa8656.png) +![](89a07e9b-00ab-4967-976a-c723b2aa8656.png) **Input:** points = [[2,1],[2,2],[3,3]], angle = 90, location = [1,1] @@ -34,7 +34,7 @@ Return _the maximum number of points you can see_. **Example 3:** -![](https://assets.leetcode.com/uploads/2020/09/30/5010bfd3-86e6-465f-ac64-e9df941d2e49.png) +![](5010bfd3-86e6-465f-ac64-e9df941d2e49.png) **Input:** points = [[1,0],[2,1]], angle = 13, location = [1,1] diff --git a/src/main/java/g1601_1700/s1615_maximal_network_rank/ex1.png b/src/main/java/g1601_1700/s1615_maximal_network_rank/ex1.png new file mode 100644 index 000000000..0485b2fce Binary files /dev/null and b/src/main/java/g1601_1700/s1615_maximal_network_rank/ex1.png differ diff --git a/src/main/java/g1601_1700/s1615_maximal_network_rank/ex2.png b/src/main/java/g1601_1700/s1615_maximal_network_rank/ex2.png new file mode 100644 index 000000000..f42c78f9a Binary files /dev/null and b/src/main/java/g1601_1700/s1615_maximal_network_rank/ex2.png differ diff --git a/src/main/java/g1601_1700/s1615_maximal_network_rank/readme.md b/src/main/java/g1601_1700/s1615_maximal_network_rank/readme.md index 6f421094c..80e85669b 100644 --- a/src/main/java/g1601_1700/s1615_maximal_network_rank/readme.md +++ b/src/main/java/g1601_1700/s1615_maximal_network_rank/readme.md @@ -12,7 +12,7 @@ Given the integer `n` and the array `roads`, return _the **maximal network rank* **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/09/21/ex1.png)** +**![](ex1.png)** **Input:** n = 4, roads = [[0,1],[0,3],[1,2],[1,3]] @@ -22,7 +22,7 @@ Given the integer `n` and the array `roads`, return _the **maximal network rank* **Example 2:** -**![](https://assets.leetcode.com/uploads/2020/09/21/ex2.png)** +**![](ex2.png)** **Input:** n = 5, roads = [[0,1],[0,3],[1,2],[1,3],[2,3],[2,4]] diff --git a/src/main/java/g1601_1700/s1617_count_subtrees_with_max_distance_between_cities/p1.png b/src/main/java/g1601_1700/s1617_count_subtrees_with_max_distance_between_cities/p1.png new file mode 100644 index 000000000..c3b6fd846 Binary files /dev/null and b/src/main/java/g1601_1700/s1617_count_subtrees_with_max_distance_between_cities/p1.png differ diff --git a/src/main/java/g1601_1700/s1617_count_subtrees_with_max_distance_between_cities/readme.md b/src/main/java/g1601_1700/s1617_count_subtrees_with_max_distance_between_cities/readme.md index 6c5292753..f31e50072 100644 --- a/src/main/java/g1601_1700/s1617_count_subtrees_with_max_distance_between_cities/readme.md +++ b/src/main/java/g1601_1700/s1617_count_subtrees_with_max_distance_between_cities/readme.md @@ -14,7 +14,7 @@ Return _an array of size_ `n-1` _where the_ dth _element **Example 1:** -**![](https://assets.leetcode.com/uploads/2020/09/21/p1.png)** +**![](p1.png)** **Input:** n = 4, edges = [[1,2],[2,3],[2,4]] diff --git a/src/main/java/g1601_1700/s1620_coordinate_with_maximum_network_quality/readme.md b/src/main/java/g1601_1700/s1620_coordinate_with_maximum_network_quality/readme.md index a7b454fc0..5db5a7055 100644 --- a/src/main/java/g1601_1700/s1620_coordinate_with_maximum_network_quality/readme.md +++ b/src/main/java/g1601_1700/s1620_coordinate_with_maximum_network_quality/readme.md @@ -19,7 +19,7 @@ Return _the array_ [cx, cy] _representing the **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/22/untitled-diagram.png) +![](untitled-diagram.png) **Input:** towers = [[1,2,5],[2,1,7],[3,1,9]], radius = 2 diff --git a/src/main/java/g1601_1700/s1620_coordinate_with_maximum_network_quality/untitled-diagram.png b/src/main/java/g1601_1700/s1620_coordinate_with_maximum_network_quality/untitled-diagram.png new file mode 100644 index 000000000..e3c76b4d9 Binary files /dev/null and b/src/main/java/g1601_1700/s1620_coordinate_with_maximum_network_quality/untitled-diagram.png differ diff --git a/src/main/java/g1601_1700/s1621_number_of_sets_of_k_non_overlapping_line_segments/ex1.png b/src/main/java/g1601_1700/s1621_number_of_sets_of_k_non_overlapping_line_segments/ex1.png new file mode 100644 index 000000000..cd5e4b526 Binary files /dev/null and b/src/main/java/g1601_1700/s1621_number_of_sets_of_k_non_overlapping_line_segments/ex1.png differ diff --git a/src/main/java/g1601_1700/s1621_number_of_sets_of_k_non_overlapping_line_segments/readme.md b/src/main/java/g1601_1700/s1621_number_of_sets_of_k_non_overlapping_line_segments/readme.md index e93248e5f..f258a99e7 100644 --- a/src/main/java/g1601_1700/s1621_number_of_sets_of_k_non_overlapping_line_segments/readme.md +++ b/src/main/java/g1601_1700/s1621_number_of_sets_of_k_non_overlapping_line_segments/readme.md @@ -8,7 +8,7 @@ Return _the number of ways we can draw_ `k` _non-overlapping line segments__._ S **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/07/ex1.png) +![](ex1.png) **Input:** n = 4, k = 2 diff --git a/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/ex1.jpg b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/ex1.jpg new file mode 100644 index 000000000..4e3cc4796 Binary files /dev/null and b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/ex1.jpg differ diff --git a/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/ex3.jpg b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/ex3.jpg new file mode 100644 index 000000000..59bebb9b7 Binary files /dev/null and b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/ex3.jpg differ diff --git a/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/readme.md b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/readme.md index aab2f08e8..064f60979 100644 --- a/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/readme.md +++ b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/readme.md @@ -14,7 +14,7 @@ Return _an array_ `answer`_, where_ `answer.length == queries.length` _and_ `ans **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/09/ex1.jpg) +![](ex1.jpg) **Input:** n = 6, threshold = 2, queries = [[1,4],[2,5],[3,6]] @@ -44,7 +44,7 @@ Using the underlined divisors above the threshold, only cities 3 and 6 share a c **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/10/tmp.jpg) +![](tmp.jpg) **Input:** n = 6, threshold = 0, queries = [[4,5],[3,4],[3,2],[2,6],[1,3]] @@ -54,7 +54,7 @@ Using the underlined divisors above the threshold, only cities 3 and 6 share a c **Example 3:** -![](https://assets.leetcode.com/uploads/2020/10/17/ex3.jpg) +![](ex3.jpg) **Input:** n = 5, threshold = 1, queries = [[4,5],[4,5],[3,2],[2,3],[3,4]] diff --git a/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/tmp.jpg b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/tmp.jpg new file mode 100644 index 000000000..6abd60f4e Binary files /dev/null and b/src/main/java/g1601_1700/s1627_graph_connectivity_with_threshold/tmp.jpg differ diff --git a/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex1.png b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex1.png new file mode 100644 index 000000000..eb36b17f2 Binary files /dev/null and b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex1.png differ diff --git a/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex2.png b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex2.png new file mode 100644 index 000000000..2f9d92225 Binary files /dev/null and b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex2.png differ diff --git a/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex3.png b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex3.png new file mode 100644 index 000000000..883262d91 Binary files /dev/null and b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/ex3.png differ diff --git a/src/main/java/g1601_1700/s1631_path_with_minimum_effort/readme.md b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/readme.md index 2b052ca21..18a661cbf 100644 --- a/src/main/java/g1601_1700/s1631_path_with_minimum_effort/readme.md +++ b/src/main/java/g1601_1700/s1631_path_with_minimum_effort/readme.md @@ -10,7 +10,7 @@ Return _the minimum **effort** required to travel from the top-left cell to the **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/04/ex1.png) +![](ex1.png) **Input:** heights = [[1,2,2],[3,8,2],[5,3,5]] @@ -20,7 +20,7 @@ Return _the minimum **effort** required to travel from the top-left cell to the **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/04/ex2.png) +![](ex2.png) **Input:** heights = [[1,2,3],[3,8,4],[5,3,5]] @@ -30,7 +30,7 @@ Return _the minimum **effort** required to travel from the top-left cell to the **Example 3:** -![](https://assets.leetcode.com/uploads/2020/10/04/ex3.png) +![](ex3.png) **Input:** heights = [[1,2,1,1,1],[1,2,1,2,1],[1,2,1,2,1],[1,2,1,2,1],[1,1,1,2,1]] diff --git a/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank1.jpg b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank1.jpg new file mode 100644 index 000000000..6c2b5e8ff Binary files /dev/null and b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank1.jpg differ diff --git a/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank2.jpg b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank2.jpg new file mode 100644 index 000000000..fca233da7 Binary files /dev/null and b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank2.jpg differ diff --git a/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank3.jpg b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank3.jpg new file mode 100644 index 000000000..0f9fc2089 Binary files /dev/null and b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/rank3.jpg differ diff --git a/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/readme.md b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/readme.md index d1aeaf630..bb611531f 100644 --- a/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/readme.md +++ b/src/main/java/g1601_1700/s1632_rank_transform_of_a_matrix/readme.md @@ -17,7 +17,7 @@ The test cases are generated so that `answer` is unique under the given rules. **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/18/rank1.jpg) +![](rank1.jpg) **Input:** matrix = [[1,2],[3,4]] @@ -35,7 +35,7 @@ The rank of matrix[1][1] is 3 because matrix[1][1] > matrix[0][1], matrix[1][1] **Example 2:** -![](https://assets.leetcode.com/uploads/2020/10/18/rank2.jpg) +![](rank2.jpg) **Input:** matrix = [[7,7],[7,7]] @@ -43,7 +43,7 @@ The rank of matrix[1][1] is 3 because matrix[1][1] > matrix[0][1], matrix[1][1] **Example 3:** -![](https://assets.leetcode.com/uploads/2020/10/18/rank3.jpg) +![](rank3.jpg) **Input:** matrix = [[20,-21,14],[-19,4,19],[22,-47,24],[-19,4,19]] diff --git a/src/main/java/g1601_1700/s1637_widest_vertical_area_between_two_points_containing_no_points/points3.png b/src/main/java/g1601_1700/s1637_widest_vertical_area_between_two_points_containing_no_points/points3.png new file mode 100644 index 000000000..1cf3df122 Binary files /dev/null and b/src/main/java/g1601_1700/s1637_widest_vertical_area_between_two_points_containing_no_points/points3.png differ diff --git a/src/main/java/g1601_1700/s1637_widest_vertical_area_between_two_points_containing_no_points/readme.md b/src/main/java/g1601_1700/s1637_widest_vertical_area_between_two_points_containing_no_points/readme.md index a9bba14e0..6eec3cbf9 100644 --- a/src/main/java/g1601_1700/s1637_widest_vertical_area_between_two_points_containing_no_points/readme.md +++ b/src/main/java/g1601_1700/s1637_widest_vertical_area_between_two_points_containing_no_points/readme.md @@ -10,7 +10,7 @@ Note that points **on the edge** of a vertical area **are not** considered inclu **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/19/points3.png) +![](points3.png) **Input:** points = [[8,7],[9,9],[7,4],[9,7]] diff --git a/src/main/java/g1601_1700/s1642_furthest_building_you_can_reach/q4.gif b/src/main/java/g1601_1700/s1642_furthest_building_you_can_reach/q4.gif new file mode 100644 index 000000000..b9118152f Binary files /dev/null and b/src/main/java/g1601_1700/s1642_furthest_building_you_can_reach/q4.gif differ diff --git a/src/main/java/g1601_1700/s1642_furthest_building_you_can_reach/readme.md b/src/main/java/g1601_1700/s1642_furthest_building_you_can_reach/readme.md index 87afd1b09..05f483b28 100644 --- a/src/main/java/g1601_1700/s1642_furthest_building_you_can_reach/readme.md +++ b/src/main/java/g1601_1700/s1642_furthest_building_you_can_reach/readme.md @@ -15,7 +15,7 @@ _Return the furthest building index (0-indexed) you can reach if you use the giv **Example 1:** -![](https://assets.leetcode.com/uploads/2020/10/27/q4.gif) +![](q4.gif) **Input:** heights = [4,2,7,6,9,14,12], bricks = 5, ladders = 1 diff --git a/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex1.png b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex1.png new file mode 100644 index 000000000..02f3c6a79 Binary files /dev/null and b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex1.png differ diff --git a/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex2.png b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex2.png new file mode 100644 index 000000000..0764297a0 Binary files /dev/null and b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex2.png differ diff --git a/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex3.png b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex3.png new file mode 100644 index 000000000..e89253316 Binary files /dev/null and b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/ex3.png differ diff --git a/src/main/java/g1601_1700/s1643_kth_smallest_instructions/readme.md b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/readme.md index 58113f8d6..4a11c4f22 100644 --- a/src/main/java/g1601_1700/s1643_kth_smallest_instructions/readme.md +++ b/src/main/java/g1601_1700/s1643_kth_smallest_instructions/readme.md @@ -17,7 +17,7 @@ Given an integer array `destination` and an integer `k`, return _the_ kkkath node to the b< The blue edges and nodes in the following figure indicate the result: -![](https://assets.leetcode.com/uploads/2020/11/05/fig1.png) +![](fig1.png) _Build the result list and return its head._ **Example 1:** -![](https://assets.leetcode.com/uploads/2020/11/05/merge_linked_list_ex1.png) +![](merge_linked_list_ex1.png) **Input:** list1 = [0,1,2,3,4,5], a = 3, b = 4, list2 = [1000000,1000001,1000002] @@ -26,7 +26,7 @@ The blue edges and nodes in the above figure indicate the result. **Example 2:** -![](https://assets.leetcode.com/uploads/2020/11/05/merge_linked_list_ex2.png) +![](merge_linked_list_ex2.png) **Input:** list1 = [0,1,2,3,4,5,6], a = 2, b = 5, list2 = [1000000,1000001,1000002,1000003,1000004] diff --git a/src/main/java/g1601_1700/s1691_maximum_height_by_stacking_cuboids/image.jpg b/src/main/java/g1601_1700/s1691_maximum_height_by_stacking_cuboids/image.jpg new file mode 100644 index 000000000..c9f99444a Binary files /dev/null and b/src/main/java/g1601_1700/s1691_maximum_height_by_stacking_cuboids/image.jpg differ diff --git a/src/main/java/g1601_1700/s1691_maximum_height_by_stacking_cuboids/readme.md b/src/main/java/g1601_1700/s1691_maximum_height_by_stacking_cuboids/readme.md index f7be073cd..018aee6b4 100644 --- a/src/main/java/g1601_1700/s1691_maximum_height_by_stacking_cuboids/readme.md +++ b/src/main/java/g1601_1700/s1691_maximum_height_by_stacking_cuboids/readme.md @@ -10,7 +10,7 @@ Return _the **maximum height** of the stacked_ `cuboids`. **Example 1:** -**![](https://assets.leetcode.com/uploads/2019/10/21/image.jpg)** +**![](image.jpg)** **Input:** cuboids = [[50,45,20],[95,37,53],[45,23,12]] diff --git a/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/h.png b/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/h.png new file mode 100644 index 000000000..b3f966c06 Binary files /dev/null and b/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/h.png differ diff --git a/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/q.png b/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/q.png new file mode 100644 index 000000000..813151876 Binary files /dev/null and b/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/q.png differ diff --git a/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/readme.md b/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/readme.md index 31e99d5c5..b18bc05d7 100644 --- a/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/readme.md +++ b/src/main/java/g1601_1700/s1697_checking_existence_of_edge_length_limited_paths/readme.md @@ -10,7 +10,7 @@ Return _a **boolean array**_ `answer`_, where_ `answer.length == queries.length` **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/08/h.png) +![](h.png) **Input:** n = 3, edgeList = [[0,1,2],[1,2,4],[2,0,8],[1,0,16]], queries = [[0,1,2],[0,2,5]] @@ -24,7 +24,7 @@ For the second query, there is a path (0 -> 1 -> 2) of two edges with distances **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/08/q.png) +![](q.png) **Input:** n = 5, edgeList = [[0,1,10],[1,2,5],[2,3,9],[3,4,13]], queries = [[0,4,14],[1,4,13]] diff --git a/src/main/java/g1701_1800/s1706_where_will_the_ball_fall/ball.jpg b/src/main/java/g1701_1800/s1706_where_will_the_ball_fall/ball.jpg new file mode 100644 index 000000000..87f0a17d5 Binary files /dev/null and b/src/main/java/g1701_1800/s1706_where_will_the_ball_fall/ball.jpg differ diff --git a/src/main/java/g1701_1800/s1706_where_will_the_ball_fall/readme.md b/src/main/java/g1701_1800/s1706_where_will_the_ball_fall/readme.md index aa5545436..76b90cb51 100644 --- a/src/main/java/g1701_1800/s1706_where_will_the_ball_fall/readme.md +++ b/src/main/java/g1701_1800/s1706_where_will_the_ball_fall/readme.md @@ -15,7 +15,7 @@ Return _an array_ `answer` _of size_ `n` _where_ `answer[i]` _is the column that **Example 1:** -**![](https://assets.leetcode.com/uploads/2019/09/26/ball.jpg)** +**![](ball.jpg)** **Input:** grid = [[1,1,1,-1,-1],[1,1,1,-1,-1],[-1,-1,-1,1,1],[1,1,1,1,-1],[-1,-1,-1,-1,-1]] diff --git a/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/readme.md b/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/readme.md index f580f410f..8a08f1633 100644 --- a/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/readme.md +++ b/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/readme.md @@ -27,7 +27,7 @@ An **ancestor** of a node is any node on the path from the root to that node (ex **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/03/trees2.png) +![](trees2.png) **Input:** pairs = [[1,2],[2,3]] @@ -37,7 +37,7 @@ An **ancestor** of a node is any node on the path from the root to that node (ex **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/03/tree.png) +![](tree.png) **Input:** pairs = [[1,2],[2,3],[1,3]] diff --git a/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/tree.png b/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/tree.png new file mode 100644 index 000000000..bdd6841c2 Binary files /dev/null and b/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/tree.png differ diff --git a/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/trees2.png b/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/trees2.png new file mode 100644 index 000000000..9b1d0b7a2 Binary files /dev/null and b/src/main/java/g1701_1800/s1719_number_of_ways_to_reconstruct_a_tree/trees2.png differ diff --git a/src/main/java/g1701_1800/s1721_swapping_nodes_in_a_linked_list/linked1.jpg b/src/main/java/g1701_1800/s1721_swapping_nodes_in_a_linked_list/linked1.jpg new file mode 100644 index 000000000..4cea7c4c0 Binary files /dev/null and b/src/main/java/g1701_1800/s1721_swapping_nodes_in_a_linked_list/linked1.jpg differ diff --git a/src/main/java/g1701_1800/s1721_swapping_nodes_in_a_linked_list/readme.md b/src/main/java/g1701_1800/s1721_swapping_nodes_in_a_linked_list/readme.md index 297dd2e88..e053e1e8d 100644 --- a/src/main/java/g1701_1800/s1721_swapping_nodes_in_a_linked_list/readme.md +++ b/src/main/java/g1701_1800/s1721_swapping_nodes_in_a_linked_list/readme.md @@ -8,7 +8,7 @@ Return _the head of the linked list after **swapping** the values of the_ **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/21/linked1.jpg) +![](linked1.jpg) **Input:** head = [1,2,3,4,5], k = 2 diff --git a/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/readme.md b/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/readme.md index 72835dbd8..50c0da69f 100644 --- a/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/readme.md +++ b/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/readme.md @@ -8,7 +8,7 @@ Return _the area of the largest submatrix within_ `matrix` _where **every** elem **Example 1:** -![](https://assets.leetcode.com/uploads/2020/12/29/screenshot-2020-12-30-at-40536-pm.png) +![](screenshot-2020-12-30-at-40536-pm.png) **Input:** matrix = [[0,0,1],[1,1,1],[1,0,1]] @@ -18,7 +18,7 @@ Return _the area of the largest submatrix within_ `matrix` _where **every** elem **Example 2:** -![](https://assets.leetcode.com/uploads/2020/12/29/screenshot-2020-12-30-at-40852-pm.png) +![](screenshot-2020-12-30-at-40852-pm.png) **Input:** matrix = [[1,0,1,0,1]] diff --git a/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/screenshot-2020-12-30-at-40536-pm.png b/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/screenshot-2020-12-30-at-40536-pm.png new file mode 100644 index 000000000..9d47c660d Binary files /dev/null and b/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/screenshot-2020-12-30-at-40536-pm.png differ diff --git a/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/screenshot-2020-12-30-at-40852-pm.png b/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/screenshot-2020-12-30-at-40852-pm.png new file mode 100644 index 000000000..447b7a7d5 Binary files /dev/null and b/src/main/java/g1701_1800/s1727_largest_submatrix_with_rearrangements/screenshot-2020-12-30-at-40852-pm.png differ diff --git a/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/readme.md b/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/readme.md index 7bde63e94..a8aaf6cf6 100644 --- a/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/readme.md +++ b/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/readme.md @@ -31,7 +31,7 @@ Given a `rows x cols` matrix `grid` and two integers `catJump` and `mouseJump`, **Example 1:** -![](https://assets.leetcode.com/uploads/2020/09/12/sample_111_1955.png) +![](sample_111_1955.png) **Input:** grid = ["####F","#C...","M...."], catJump = 1, mouseJump = 2 @@ -41,7 +41,7 @@ Given a `rows x cols` matrix `grid` and two integers `catJump` and `mouseJump`, **Example 2:** -![](https://assets.leetcode.com/uploads/2020/09/12/sample_2_1955.png) +![](sample_2_1955.png) **Input:** grid = ["M.C...F"], catJump = 1, mouseJump = 4 diff --git a/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/sample_111_1955.png b/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/sample_111_1955.png new file mode 100644 index 000000000..c4461e92e Binary files /dev/null and b/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/sample_111_1955.png differ diff --git a/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/sample_2_1955.png b/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/sample_2_1955.png new file mode 100644 index 000000000..c626aab86 Binary files /dev/null and b/src/main/java/g1701_1800/s1728_cat_and_mouse_ii/sample_2_1955.png differ diff --git a/src/main/java/g1701_1800/s1739_building_boxes/10-boxes.png b/src/main/java/g1701_1800/s1739_building_boxes/10-boxes.png new file mode 100644 index 000000000..b5ad8c71a Binary files /dev/null and b/src/main/java/g1701_1800/s1739_building_boxes/10-boxes.png differ diff --git a/src/main/java/g1701_1800/s1739_building_boxes/3-boxes.png b/src/main/java/g1701_1800/s1739_building_boxes/3-boxes.png new file mode 100644 index 000000000..b0b27e94d Binary files /dev/null and b/src/main/java/g1701_1800/s1739_building_boxes/3-boxes.png differ diff --git a/src/main/java/g1701_1800/s1739_building_boxes/4-boxes.png b/src/main/java/g1701_1800/s1739_building_boxes/4-boxes.png new file mode 100644 index 000000000..83e9229a0 Binary files /dev/null and b/src/main/java/g1701_1800/s1739_building_boxes/4-boxes.png differ diff --git a/src/main/java/g1701_1800/s1739_building_boxes/readme.md b/src/main/java/g1701_1800/s1739_building_boxes/readme.md index bc9f8ea1f..0f8d70d5e 100644 --- a/src/main/java/g1701_1800/s1739_building_boxes/readme.md +++ b/src/main/java/g1701_1800/s1739_building_boxes/readme.md @@ -11,7 +11,7 @@ Given an integer `n`, return _the **minimum** possible number of boxes touching **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/04/3-boxes.png) +![](3-boxes.png) **Input:** n = 3 @@ -21,7 +21,7 @@ Given an integer `n`, return _the **minimum** possible number of boxes touching **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/04/4-boxes.png) +![](4-boxes.png) **Input:** n = 4 @@ -31,7 +31,7 @@ Given an integer `n`, return _the **minimum** possible number of boxes touching **Example 3:** -![](https://assets.leetcode.com/uploads/2021/01/04/10-boxes.png) +![](10-boxes.png) **Input:** n = 10 diff --git a/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/readme.md b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/readme.md index 93685186d..60d316308 100644 --- a/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/readme.md +++ b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/readme.md @@ -10,7 +10,7 @@ Return _the **maximum sum** of values that you can receive by attending events._ **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/10/screenshot-2021-01-11-at-60048-pm.png) +![](screenshot-2021-01-11-at-60048-pm.png) **Input:** events = [[1,2,4],[3,4,3],[2,3,1]], k = 2 @@ -20,7 +20,7 @@ Return _the **maximum sum** of values that you can receive by attending events._ **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/10/screenshot-2021-01-11-at-60150-pm.png) +![](screenshot-2021-01-11-at-60150-pm.png) **Input:** events = [[1,2,4],[3,4,3],[2,3,10]], k = 2 @@ -30,7 +30,7 @@ Return _the **maximum sum** of values that you can receive by attending events._ **Example 3:** -**![](https://assets.leetcode.com/uploads/2021/01/10/screenshot-2021-01-11-at-60703-pm.png)** +**![](screenshot-2021-01-11-at-60703-pm.png)** **Input:** events = [[1,1,1],[2,2,2],[3,3,3],[4,4,4]], k = 3 diff --git a/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60048-pm.png b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60048-pm.png new file mode 100644 index 000000000..f207837cc Binary files /dev/null and b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60048-pm.png differ diff --git a/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60150-pm.png b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60150-pm.png new file mode 100644 index 000000000..d90dfaa5a Binary files /dev/null and b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60150-pm.png differ diff --git a/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60703-pm.png b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60703-pm.png new file mode 100644 index 000000000..99041385d Binary files /dev/null and b/src/main/java/g1701_1800/s1751_maximum_number_of_events_that_can_be_attended_ii/screenshot-2021-01-11-at-60703-pm.png differ diff --git a/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/readme.md b/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/readme.md index bc55c21f0..5f2c264b5 100644 --- a/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/readme.md +++ b/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/readme.md @@ -12,7 +12,7 @@ Return _the **minimum** degree of a connected trio in the graph, or_ `-1` _if th **Example 1:** -![](https://assets.leetcode.com/uploads/2021/01/26/trios1.png) +![](trios1.png) **Input:** n = 6, edges = [[1,2],[1,3],[3,2],[4,1],[5,2],[3,6]] @@ -22,7 +22,7 @@ Return _the **minimum** degree of a connected trio in the graph, or_ `-1` _if th **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/26/trios2.png) +![](trios2.png) **Input:** n = 7, edges = [[1,3],[4,1],[4,3],[2,5],[5,6],[6,7],[7,5],[2,6]] diff --git a/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/trios1.png b/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/trios1.png new file mode 100644 index 000000000..18f6f261b Binary files /dev/null and b/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/trios1.png differ diff --git a/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/trios2.png b/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/trios2.png new file mode 100644 index 000000000..9c5678324 Binary files /dev/null and b/src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/trios2.png differ diff --git a/src/main/java/g1701_1800/s1765_map_of_highest_peak/readme.md b/src/main/java/g1701_1800/s1765_map_of_highest_peak/readme.md index fd427174f..ccb113112 100644 --- a/src/main/java/g1701_1800/s1765_map_of_highest_peak/readme.md +++ b/src/main/java/g1701_1800/s1765_map_of_highest_peak/readme.md @@ -19,7 +19,7 @@ Return _an integer matrix_ `height` _of size_ `m x n` _where_ `height[i][j]` _is **Example 1:** -**![](https://assets.leetcode.com/uploads/2021/01/10/screenshot-2021-01-11-at-82045-am.png)** +**![](screenshot-2021-01-11-at-82045-am.png)** **Input:** isWater = [[0,1],[0,0]] @@ -29,7 +29,7 @@ Return _an integer matrix_ `height` _of size_ `m x n` _where_ `height[i][j]` _is **Example 2:** -**![](https://assets.leetcode.com/uploads/2021/01/10/screenshot-2021-01-11-at-82050-am.png)** +**![](screenshot-2021-01-11-at-82050-am.png)** **Input:** isWater = [[0,0,1],[1,0,0],[0,0,0]] diff --git a/src/main/java/g1701_1800/s1765_map_of_highest_peak/screenshot-2021-01-11-at-82045-am.png b/src/main/java/g1701_1800/s1765_map_of_highest_peak/screenshot-2021-01-11-at-82045-am.png new file mode 100644 index 000000000..4402cd710 Binary files /dev/null and b/src/main/java/g1701_1800/s1765_map_of_highest_peak/screenshot-2021-01-11-at-82045-am.png differ diff --git a/src/main/java/g1701_1800/s1765_map_of_highest_peak/screenshot-2021-01-11-at-82050-am.png b/src/main/java/g1701_1800/s1765_map_of_highest_peak/screenshot-2021-01-11-at-82050-am.png new file mode 100644 index 000000000..215f2c0f9 Binary files /dev/null and b/src/main/java/g1701_1800/s1765_map_of_highest_peak/screenshot-2021-01-11-at-82050-am.png differ diff --git a/src/main/java/g1701_1800/s1766_tree_of_coprimes/readme.md b/src/main/java/g1701_1800/s1766_tree_of_coprimes/readme.md index 2fecf8099..cd2b624f1 100644 --- a/src/main/java/g1701_1800/s1766_tree_of_coprimes/readme.md +++ b/src/main/java/g1701_1800/s1766_tree_of_coprimes/readme.md @@ -14,7 +14,7 @@ Return _an array_ `ans` _of size_ `n`, _where_ `ans[i]` _is the closest ancestor **Example 1:** -**![](https://assets.leetcode.com/uploads/2021/01/06/untitled-diagram.png)** +**![](untitled-diagram.png)** **Input:** nums = [2,3,3,2], edges = [[0,1],[1,2],[1,3]] @@ -30,7 +30,7 @@ Return _an array_ `ans` _of size_ `n`, _where_ `ans[i]` _is the closest ancestor **Example 2:** -![](https://assets.leetcode.com/uploads/2021/01/06/untitled-diagram1.png) +![](untitled-diagram1.png) **Input:** nums = [5,6,10,2,3,6,15], edges = [[0,1],[0,2],[1,3],[1,4],[2,5],[2,6]] diff --git a/src/main/java/g1701_1800/s1766_tree_of_coprimes/untitled-diagram.png b/src/main/java/g1701_1800/s1766_tree_of_coprimes/untitled-diagram.png new file mode 100644 index 000000000..670c7f2b3 Binary files /dev/null and b/src/main/java/g1701_1800/s1766_tree_of_coprimes/untitled-diagram.png differ diff --git a/src/main/java/g1701_1800/s1766_tree_of_coprimes/untitled-diagram1.png b/src/main/java/g1701_1800/s1766_tree_of_coprimes/untitled-diagram1.png new file mode 100644 index 000000000..04477d2f2 Binary files /dev/null and b/src/main/java/g1701_1800/s1766_tree_of_coprimes/untitled-diagram1.png differ diff --git a/src/main/java/g1701_1800/s1782_count_pairs_of_nodes/readme.md b/src/main/java/g1701_1800/s1782_count_pairs_of_nodes/readme.md index c494aa62c..c01edb74f 100644 --- a/src/main/java/g1701_1800/s1782_count_pairs_of_nodes/readme.md +++ b/src/main/java/g1701_1800/s1782_count_pairs_of_nodes/readme.md @@ -17,7 +17,7 @@ Note that there can be **multiple edges** between the same two nodes. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/06/08/winword_2021-06-08_00-58-39.png) +![](winword_2021-06-08_00-58-39.png) **Input:** n = 4, edges = [[1,2],[2,4],[1,3],[2,3],[2,1]], queries = [2,3] diff --git a/src/main/java/g1701_1800/s1782_count_pairs_of_nodes/winword_2021-06-08_00-58-39.png b/src/main/java/g1701_1800/s1782_count_pairs_of_nodes/winword_2021-06-08_00-58-39.png new file mode 100644 index 000000000..a2f86f034 Binary files /dev/null and b/src/main/java/g1701_1800/s1782_count_pairs_of_nodes/winword_2021-06-08_00-58-39.png differ diff --git a/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/readme.md b/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/readme.md index 8beee3d50..9d69d4266 100644 --- a/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/readme.md +++ b/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/readme.md @@ -12,7 +12,7 @@ Return _the number of restricted paths from node_ `1` _to node_ `n`. Since that **Example 1:** -![](https://assets.leetcode.com/uploads/2021/02/17/restricted_paths_ex1.png) +![](restricted_paths_ex1.png) **Input:** n = 5, edges = [[1,2,3],[1,3,3],[2,3,1],[1,4,2],[5,2,2],[3,5,1],[5,4,10]] @@ -28,7 +28,7 @@ Return _the number of restricted paths from node_ `1` _to node_ `n`. Since that **Example 2:** -![](https://assets.leetcode.com/uploads/2021/02/17/restricted_paths_ex22.png) +![](restricted_paths_ex22.png) **Input:** n = 7, edges = [[1,3,1],[4,1,2],[7,3,4],[2,5,3],[5,6,1],[6,7,2],[7,5,3],[2,6,4]] diff --git a/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/restricted_paths_ex1.png b/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/restricted_paths_ex1.png new file mode 100644 index 000000000..fb8dde7b3 Binary files /dev/null and b/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/restricted_paths_ex1.png differ diff --git a/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/restricted_paths_ex22.png b/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/restricted_paths_ex22.png new file mode 100644 index 000000000..bc935b886 Binary files /dev/null and b/src/main/java/g1701_1800/s1786_number_of_restricted_paths_from_first_to_last_node/restricted_paths_ex22.png differ diff --git a/src/main/java/g1701_1800/s1791_find_center_of_star_graph/readme.md b/src/main/java/g1701_1800/s1791_find_center_of_star_graph/readme.md index 32d4dde00..0be6c7970 100644 --- a/src/main/java/g1701_1800/s1791_find_center_of_star_graph/readme.md +++ b/src/main/java/g1701_1800/s1791_find_center_of_star_graph/readme.md @@ -8,7 +8,7 @@ You are given a 2D integer array `edges` where each edges[i] = [uijjithithith and jth⌊n / 2⌋th **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/16/eg1drawio.png) +![](eg1drawio.png) **Input:** head = [1,3,4,7,1,2,6] @@ -26,7 +26,7 @@ We return the new list after removing this node. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/11/16/eg2drawio.png) +![](eg2drawio.png) **Input:** head = [1,2,3,4] @@ -40,7 +40,7 @@ For n = 4, node 2 with value 3 is the middle node, which is marked in red. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/11/16/eg3drawio.png) +![](eg3drawio.png) **Input:** head = [2,1] diff --git a/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/eg1.png b/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/eg1.png new file mode 100644 index 000000000..cced0bd46 Binary files /dev/null and b/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/eg1.png differ diff --git a/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/eg2.png b/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/eg2.png new file mode 100644 index 000000000..0b1d6d6cc Binary files /dev/null and b/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/eg2.png differ diff --git a/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/readme.md b/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/readme.md index 94ffcad1b..c4570cd80 100644 --- a/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/readme.md +++ b/src/main/java/g2001_2100/s2096_step_by_step_directions_from_a_binary_tree_node_to_another/readme.md @@ -14,7 +14,7 @@ Return _the step-by-step directions of the **shortest path** from node_ `s` _to **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/15/eg1.png) +![](eg1.png) **Input:** root = [5,1,2,3,null,6,4], startValue = 3, destValue = 6 @@ -24,7 +24,7 @@ Return _the step-by-step directions of the **shortest path** from node_ `s` _to **Example 2:** -![](https://assets.leetcode.com/uploads/2021/11/15/eg2.png) +![](eg2.png) **Input:** root = [2,1], startValue = 2, destValue = 1 diff --git a/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg-2.png b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg-2.png new file mode 100644 index 000000000..72085c819 Binary files /dev/null and b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg-2.png differ diff --git a/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg-3.png b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg-3.png new file mode 100644 index 000000000..e0c6f4577 Binary files /dev/null and b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg-3.png differ diff --git a/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg1.png b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg1.png new file mode 100644 index 000000000..08a25d75d Binary files /dev/null and b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/desmos-eg1.png differ diff --git a/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/readme.md b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/readme.md index fa3b27d9e..0cbca2324 100644 --- a/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/readme.md +++ b/src/main/java/g2101_2200/s2101_detonate_the_maximum_bombs/readme.md @@ -12,7 +12,7 @@ Given the list of `bombs`, return _the **maximum** number of bombs that can be d **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/06/desmos-eg-3.png) +![](desmos-eg-3.png) **Input:** bombs = [[2,1,3],[6,1,4]] @@ -30,7 +30,7 @@ So the maximum bombs that can be detonated is max(1, 2) = 2. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/11/06/desmos-eg-2.png) +![](desmos-eg-2.png) **Input:** bombs = [[1,1,5],[10,10,5]] @@ -40,7 +40,7 @@ So the maximum bombs that can be detonated is max(1, 2) = 2. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/11/07/desmos-eg1.png) +![](desmos-eg1.png) **Input:** bombs = [[1,2,3],[2,3,1],[3,4,2],[4,5,3],[5,6,4]] diff --git a/src/main/java/g2101_2200/s2103_rings_and_rods/ex1final.png b/src/main/java/g2101_2200/s2103_rings_and_rods/ex1final.png new file mode 100644 index 000000000..745db94ee Binary files /dev/null and b/src/main/java/g2101_2200/s2103_rings_and_rods/ex1final.png differ diff --git a/src/main/java/g2101_2200/s2103_rings_and_rods/ex2final.png b/src/main/java/g2101_2200/s2103_rings_and_rods/ex2final.png new file mode 100644 index 000000000..9ae7171e6 Binary files /dev/null and b/src/main/java/g2101_2200/s2103_rings_and_rods/ex2final.png differ diff --git a/src/main/java/g2101_2200/s2103_rings_and_rods/readme.md b/src/main/java/g2101_2200/s2103_rings_and_rods/readme.md index d3345da3a..1ba6e28bd 100644 --- a/src/main/java/g2101_2200/s2103_rings_and_rods/readme.md +++ b/src/main/java/g2101_2200/s2103_rings_and_rods/readme.md @@ -15,7 +15,7 @@ Return _the number of rods that have **all three colors** of rings on them._ **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/23/ex1final.png) +![](ex1final.png) **Input:** rings = "B0B6G0R6R0R6G9" @@ -33,7 +33,7 @@ Thus, the number of rods with all three colors is 1. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/11/23/ex2final.png) +![](ex2final.png) **Input:** rings = "B0R0G0R9R0B0G0" diff --git a/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/1.png b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/1.png new file mode 100644 index 000000000..591a58de6 Binary files /dev/null and b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/1.png differ diff --git a/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/2.png b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/2.png new file mode 100644 index 000000000..c9adbb06d Binary files /dev/null and b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/2.png differ diff --git a/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/3.png b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/3.png new file mode 100644 index 000000000..bed918ea7 Binary files /dev/null and b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/3.png differ diff --git a/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/readme.md b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/readme.md index 5c8f5f512..a455ad495 100644 --- a/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/readme.md +++ b/src/main/java/g2101_2200/s2106_maximum_fruits_harvested_after_at_most_k_steps/readme.md @@ -10,7 +10,7 @@ Return _the **maximum total number** of fruits you can harvest_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/21/1.png) +![](1.png) **Input:** fruits = [[2,8],[6,3],[8,6]], startPos = 5, k = 4 @@ -26,7 +26,7 @@ You moved 3 steps and harvested 3 + 6 = 9 fruits in total. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/11/21/2.png) +![](2.png) **Input:** fruits = [[0,9],[4,1],[5,7],[6,2],[7,4],[10,9]], startPos = 5, k = 4 @@ -46,7 +46,7 @@ You moved 1 + 3 = 4 steps and harvested 7 + 1 + 2 + 4 = 14 fruits in total. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/11/21/3.png) +![](3.png) **Input:** fruits = [[0,3],[6,4],[8,5]], startPos = 3, k = 2 diff --git a/src/main/java/g2101_2200/s2116_check_if_a_parentheses_string_can_be_valid/eg1.png b/src/main/java/g2101_2200/s2116_check_if_a_parentheses_string_can_be_valid/eg1.png new file mode 100644 index 000000000..11fc2d2a0 Binary files /dev/null and b/src/main/java/g2101_2200/s2116_check_if_a_parentheses_string_can_be_valid/eg1.png differ diff --git a/src/main/java/g2101_2200/s2116_check_if_a_parentheses_string_can_be_valid/readme.md b/src/main/java/g2101_2200/s2116_check_if_a_parentheses_string_can_be_valid/readme.md index afba654ab..60021f18a 100644 --- a/src/main/java/g2101_2200/s2116_check_if_a_parentheses_string_can_be_valid/readme.md +++ b/src/main/java/g2101_2200/s2116_check_if_a_parentheses_string_can_be_valid/readme.md @@ -17,7 +17,7 @@ Return `true` _if you can make `s` a valid parentheses string_. Otherwise, retur **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/06/eg1.png) +![](eg1.png) **Input:** s = "))()))", locked = "010100" diff --git a/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/1.png b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/1.png new file mode 100644 index 000000000..9b66080ef Binary files /dev/null and b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/1.png differ diff --git a/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/2.png b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/2.png new file mode 100644 index 000000000..baa5883a3 Binary files /dev/null and b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/2.png differ diff --git a/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/3.png b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/3.png new file mode 100644 index 000000000..2c999be41 Binary files /dev/null and b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/3.png differ diff --git a/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/readme.md b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/readme.md index 90246379e..9a0b74b19 100644 --- a/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/readme.md +++ b/src/main/java/g2101_2200/s2120_execution_of_all_suffix_instructions_staying_in_a_grid/readme.md @@ -15,7 +15,7 @@ Return _an array_ `answer` _of length_ `m` _where_ `answer[i]` _is **the number **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/09/1.png) +![](1.png) **Input:** n = 3, startPos = [0,1], s = "RRDDLU" @@ -37,7 +37,7 @@ Return _an array_ `answer` _of length_ `m` _where_ `answer[i]` _is **the number **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/09/2.png) +![](2.png) **Input:** n = 2, startPos = [1,1], s = "LURD" @@ -55,7 +55,7 @@ Return _an array_ `answer` _of length_ `m` _where_ `answer[i]` _is **the number **Example 3:** -![](https://assets.leetcode.com/uploads/2021/12/09/3.png) +![](3.png) **Input:** n = 1, startPos = [0,0], s = "LRUD" diff --git a/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/laser1.jpg b/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/laser1.jpg new file mode 100644 index 000000000..a26626de2 Binary files /dev/null and b/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/laser1.jpg differ diff --git a/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/laser2.jpg b/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/laser2.jpg new file mode 100644 index 000000000..931df9d36 Binary files /dev/null and b/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/laser2.jpg differ diff --git a/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/readme.md b/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/readme.md index 59e0589c9..61965d7f5 100644 --- a/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/readme.md +++ b/src/main/java/g2101_2200/s2125_number_of_laser_beams_in_a_bank/readme.md @@ -15,7 +15,7 @@ Return _the total number of laser beams in the bank_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/24/laser1.jpg) +![](laser1.jpg) **Input:** bank = ["011001","000000","010100","001000"] @@ -45,7 +45,7 @@ This is because the 2nd row contains security devices, which breaks t **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/24/laser2.jpg) +![](laser2.jpg) **Input:** bank = ["000","111","000"] diff --git a/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/ex1.png b/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/ex1.png new file mode 100644 index 000000000..8f6cfb344 Binary files /dev/null and b/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/ex1.png differ diff --git a/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/ex2.png b/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/ex2.png new file mode 100644 index 000000000..abee3bd09 Binary files /dev/null and b/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/ex2.png differ diff --git a/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/readme.md b/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/readme.md index 70bebfb6a..7cd4f91a5 100644 --- a/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/readme.md +++ b/src/main/java/g2101_2200/s2127_maximum_employees_to_be_invited_to_a_meeting/readme.md @@ -10,7 +10,7 @@ Given a **0-indexed** integer array `favorite`, where `favorite[i]` denotes the **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/14/ex1.png) +![](ex1.png) **Input:** favorite = [2,2,1,2] @@ -48,7 +48,7 @@ The maximum number of employees that can be invited to the meeting is 3. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/12/14/ex2.png) +![](ex2.png) **Input:** favorite = [3,0,1,4,1] diff --git a/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg1drawio.png b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg1drawio.png new file mode 100644 index 000000000..49780bc57 Binary files /dev/null and b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg1drawio.png differ diff --git a/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg2drawio.png b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg2drawio.png new file mode 100644 index 000000000..b4c3bc563 Binary files /dev/null and b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg2drawio.png differ diff --git a/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg3drawio.png b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg3drawio.png new file mode 100644 index 000000000..8944be568 Binary files /dev/null and b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/eg3drawio.png differ diff --git a/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/readme.md b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/readme.md index 47aa82764..6d08e2379 100644 --- a/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/readme.md +++ b/src/main/java/g2101_2200/s2130_maximum_twin_sum_of_a_linked_list/readme.md @@ -12,7 +12,7 @@ Given the `head` of a linked list with even length, return _the **maximum twin s **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/03/eg1drawio.png) +![](eg1drawio.png) **Input:** head = [5,4,2,1] @@ -28,7 +28,7 @@ Thus, the maximum twin sum of the linked list is 6. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/03/eg2drawio.png) +![](eg2drawio.png) **Input:** head = [4,2,2,3] @@ -46,7 +46,7 @@ Thus, the maximum twin sum of the linked list is max(7, 4) = 7. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/12/03/eg3drawio.png) +![](eg3drawio.png) **Input:** head = [1,100000] diff --git a/src/main/java/g2101_2200/s2132_stamping_the_grid/ex1.png b/src/main/java/g2101_2200/s2132_stamping_the_grid/ex1.png new file mode 100644 index 000000000..56fd60290 Binary files /dev/null and b/src/main/java/g2101_2200/s2132_stamping_the_grid/ex1.png differ diff --git a/src/main/java/g2101_2200/s2132_stamping_the_grid/ex2.png b/src/main/java/g2101_2200/s2132_stamping_the_grid/ex2.png new file mode 100644 index 000000000..763402ec6 Binary files /dev/null and b/src/main/java/g2101_2200/s2132_stamping_the_grid/ex2.png differ diff --git a/src/main/java/g2101_2200/s2132_stamping_the_grid/readme.md b/src/main/java/g2101_2200/s2132_stamping_the_grid/readme.md index 7fe394579..8a6c16ab4 100644 --- a/src/main/java/g2101_2200/s2132_stamping_the_grid/readme.md +++ b/src/main/java/g2101_2200/s2132_stamping_the_grid/readme.md @@ -17,7 +17,7 @@ Return `true` _if it is possible to fit the stamps while following the given res **Example 1:** -![](https://assets.leetcode.com/uploads/2021/11/03/ex1.png) +![](ex1.png) **Input:** grid = [[1,0,0,0],[1,0,0,0],[1,0,0,0],[1,0,0,0],[1,0,0,0]], stampHeight = 4, stampWidth = 3 @@ -27,7 +27,7 @@ Return `true` _if it is possible to fit the stamps while following the given res **Example 2:** -![](https://assets.leetcode.com/uploads/2021/11/03/ex2.png) +![](ex2.png) **Input:** grid = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]], stampHeight = 2, stampWidth = 2 diff --git a/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/example1drawio.png b/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/example1drawio.png new file mode 100644 index 000000000..9c195e180 Binary files /dev/null and b/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/example1drawio.png differ diff --git a/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/example2drawio.png b/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/example2drawio.png new file mode 100644 index 000000000..290df1332 Binary files /dev/null and b/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/example2drawio.png differ diff --git a/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/readme.md b/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/readme.md index dd876b017..5de7e0a7d 100644 --- a/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/readme.md +++ b/src/main/java/g2101_2200/s2133_check_if_every_row_and_column_contains_all_numbers/readme.md @@ -8,7 +8,7 @@ Given an `n x n` integer matrix `matrix`, return `true` _if the matrix is **vali **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/21/example1drawio.png) +![](example1drawio.png) **Input:** matrix = [[1,2,3],[3,1,2],[2,3,1]] @@ -18,7 +18,7 @@ Given an `n x n` integer matrix `matrix`, return `true` _if the matrix is **vali **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/21/example2drawio.png) +![](example2drawio.png) **Input:** matrix = [[1,1,1],[1,2,3],[1,2,3]] diff --git a/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/1.png b/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/1.png new file mode 100644 index 000000000..9f600ecbe Binary files /dev/null and b/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/1.png differ diff --git a/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/2.png b/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/2.png new file mode 100644 index 000000000..3a3d19f54 Binary files /dev/null and b/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/2.png differ diff --git a/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/readme.md b/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/readme.md index f00dec2ad..f66aa6c20 100644 --- a/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/readme.md +++ b/src/main/java/g2101_2200/s2136_earliest_possible_day_of_full_bloom/readme.md @@ -13,7 +13,7 @@ Return _the **earliest** possible day where **all** seeds are blooming_. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/21/1.png) +![](1.png) **Input:** plantTime = [1,4,3], growTime = [2,3,1] @@ -33,7 +33,7 @@ Thus, on day 9, all the seeds are blooming. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/21/2.png) +![](2.png) **Input:** plantTime = [1,2,3,2], growTime = [2,1,2,1] diff --git a/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/example1-fit.png b/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/example1-fit.png new file mode 100644 index 000000000..e1c59d60f Binary files /dev/null and b/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/example1-fit.png differ diff --git a/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/example2.png b/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/example2.png new file mode 100644 index 000000000..36b21d6a3 Binary files /dev/null and b/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/example2.png differ diff --git a/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/readme.md b/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/readme.md index e122df5ec..06e8c66e6 100644 --- a/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/readme.md +++ b/src/main/java/g2101_2200/s2141_maximum_running_time_of_n_computers/readme.md @@ -12,7 +12,7 @@ Return _the **maximum** number of minutes you can run all the_ `n` _computers si **Example 1:** -![](https://assets.leetcode.com/uploads/2022/01/06/example1-fit.png) +![](example1-fit.png) **Input:** n = 2, batteries = [3,3,3] @@ -32,7 +32,7 @@ We can run the two computers simultaneously for at most 4 minutes, so we return **Example 2:** -![](https://assets.leetcode.com/uploads/2022/01/06/example2.png) +![](example2.png) **Input:** n = 2, batteries = [1,1,1,1] diff --git a/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example1drawio.png b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example1drawio.png new file mode 100644 index 000000000..5c79c302d Binary files /dev/null and b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example1drawio.png differ diff --git a/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example2drawio1.png b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example2drawio1.png new file mode 100644 index 000000000..4bfbb7e74 Binary files /dev/null and b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example2drawio1.png differ diff --git a/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example3.png b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example3.png new file mode 100644 index 000000000..674223d05 Binary files /dev/null and b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/example3.png differ diff --git a/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/readme.md b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/readme.md index 4f7c79184..d98920752 100644 --- a/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/readme.md +++ b/src/main/java/g2101_2200/s2146_k_highest_ranked_items_within_a_price_range/readme.md @@ -23,7 +23,7 @@ Return _the_ `k` _highest-ranked items within the price range **sorted** by thei **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/16/example1drawio.png) +![](example1drawio.png) **Input:** grid = [[1,2,0,1],[1,3,0,1],[0,2,5,1]], pricing = [2,5], start = [0,0], k = 3 @@ -47,7 +47,7 @@ Thus, the 3 highest ranked items in the price range are (0,1), (1,1), and (2,1). **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/16/example2drawio1.png) +![](example2drawio1.png) **Input:** grid = [[1,2,0,1],[1,3,3,1],[0,2,5,1]], pricing = [2,3], start = [2,3], k = 2 @@ -71,7 +71,7 @@ Thus, the 2 highest ranked items in the price range are (2,1) and (1,2). **Example 3:** -![](https://assets.leetcode.com/uploads/2021/12/30/example3.png) +![](example3.png) **Input:** grid = [[1,1,1],[0,0,1],[2,3,4]], pricing = [2,3], start = [0,0], k = 3 diff --git a/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/1.png b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/1.png new file mode 100644 index 000000000..249b7f7d8 Binary files /dev/null and b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/1.png differ diff --git a/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/2.png b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/2.png new file mode 100644 index 000000000..5fb7f010d Binary files /dev/null and b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/2.png differ diff --git a/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/3.png b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/3.png new file mode 100644 index 000000000..b8f040f80 Binary files /dev/null and b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/3.png differ diff --git a/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/readme.md b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/readme.md index 3e92db0d7..fb7143426 100644 --- a/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/readme.md +++ b/src/main/java/g2101_2200/s2147_number_of_ways_to_divide_a_long_corridor/readme.md @@ -12,7 +12,7 @@ Return _the number of ways to divide the corridor_. Since the answer may be very **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/04/1.png) +![](1.png) **Input:** corridor = "SSPPSPS" @@ -26,7 +26,7 @@ Note that in each of the ways, **each** section has exactly **two** seats. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/04/2.png) +![](2.png) **Input:** corridor = "PPSPSP" @@ -38,7 +38,7 @@ Installing any would create some section that does not have exactly two seats. **Example 3:** -![](https://assets.leetcode.com/uploads/2021/12/12/3.png) +![](3.png) **Input:** corridor = "S" diff --git a/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/logic1.jpg b/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/logic1.jpg new file mode 100644 index 000000000..efba214e2 Binary files /dev/null and b/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/logic1.jpg differ diff --git a/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/logic2.jpg b/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/logic2.jpg new file mode 100644 index 000000000..3805a424a Binary files /dev/null and b/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/logic2.jpg differ diff --git a/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/readme.md b/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/readme.md index d70ab1d97..f715141b3 100644 --- a/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/readme.md +++ b/src/main/java/g2101_2200/s2151_maximum_good_people_based_on_statements/readme.md @@ -19,7 +19,7 @@ Return _the **maximum** number of people who can be **good** based on the statem **Example 1:** -![](https://assets.leetcode.com/uploads/2022/01/15/logic1.jpg) +![](logic1.jpg) **Input:** statements = [[2,1,2],[1,2,2],[2,0,2]] @@ -52,7 +52,7 @@ Return _the **maximum** number of people who can be **good** based on the statem **Example 2:** -![](https://assets.leetcode.com/uploads/2022/01/15/logic2.jpg) +![](logic2.jpg) **Input:** statements = [[2,0],[0,2]] diff --git a/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/1.png b/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/1.png new file mode 100644 index 000000000..860059432 Binary files /dev/null and b/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/1.png differ diff --git a/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/2.png b/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/2.png new file mode 100644 index 000000000..ce5d267ac Binary files /dev/null and b/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/2.png differ diff --git a/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/readme.md b/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/readme.md index be7511eb8..49bb673bf 100644 --- a/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/readme.md +++ b/src/main/java/g2101_2200/s2162_minimum_cost_to_set_cooking_time/readme.md @@ -24,7 +24,7 @@ Remember that one minute consists of `60` seconds. **Example 1:** -![](https://assets.leetcode.com/uploads/2021/12/30/1.png) +![](1.png) **Input:** startAt = 1, moveCost = 2, pushCost = 1, targetSeconds = 600 @@ -52,7 +52,7 @@ The cost is: 2 + 1 + 2 + 1 + 2 + 1 = 9. **Example 2:** -![](https://assets.leetcode.com/uploads/2021/12/30/2.png) +![](2.png) **Input:** startAt = 0, moveCost = 1, pushCost = 2, targetSeconds = 76 diff --git a/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/ex1-1.png b/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/ex1-1.png new file mode 100644 index 000000000..9d677e01b Binary files /dev/null and b/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/ex1-1.png differ diff --git a/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/ex2-1.png b/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/ex2-1.png new file mode 100644 index 000000000..940ae4a22 Binary files /dev/null and b/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/ex2-1.png differ diff --git a/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/readme.md b/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/readme.md index 6436b692d..39f71249b 100644 --- a/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/readme.md +++ b/src/main/java/g2101_2200/s2181_merge_nodes_in_between_zeros/readme.md @@ -10,7 +10,7 @@ Return _the_ `head` _of the modified linked list_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/02/02/ex1-1.png) +![](ex1-1.png) **Input:** head = [0,3,1,0,4,5,2,0] @@ -26,7 +26,7 @@ The above figure represents the given linked list. The modified list contains **Example 2:** -![](https://assets.leetcode.com/uploads/2022/02/02/ex2-1.png) +![](ex2-1.png) **Input:** head = [0,1,0,3,0,2,2,0] diff --git a/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/e1.png b/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/e1.png new file mode 100644 index 000000000..d70105d13 Binary files /dev/null and b/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/e1.png differ diff --git a/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/e2.png b/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/e2.png new file mode 100644 index 000000000..13097259e Binary files /dev/null and b/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/e2.png differ diff --git a/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/readme.md b/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/readme.md index eadebfd34..976972f0f 100644 --- a/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/readme.md +++ b/src/main/java/g2101_2200/s2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph/readme.md @@ -12,7 +12,7 @@ A node `u` is an **ancestor** of another node `v` if `u` can reach `v` via a set **Example 1:** -![](https://assets.leetcode.com/uploads/2019/12/12/e1.png) +![](e1.png) **Input:** n = 8, edgeList = [[0,3],[0,4],[1,3],[2,4],[2,7],[3,5],[3,6],[3,7],[4,6]] @@ -36,7 +36,7 @@ The above diagram represents the input graph. **Example 2:** -![](https://assets.leetcode.com/uploads/2019/12/12/e2.png) +![](e2.png) **Input:** n = 5, edgeList = [[0,1],[0,2],[0,3],[0,4],[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]] diff --git a/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/ex1drawio.png b/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/ex1drawio.png new file mode 100644 index 000000000..63d420086 Binary files /dev/null and b/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/ex1drawio.png differ diff --git a/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/exam2drawio.png b/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/exam2drawio.png new file mode 100644 index 000000000..142fbe9ba Binary files /dev/null and b/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/exam2drawio.png differ diff --git a/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/readme.md b/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/readme.md index b3dd410fd..600357909 100644 --- a/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/readme.md +++ b/src/main/java/g2101_2200/s2194_cells_in_a_range_on_an_excel_sheet/readme.md @@ -14,7 +14,7 @@ Return _the **list of cells**_ `(x, y)` _such that_ `r1 <= x <= r2` _and_ `c1 <= **Example 1:** -![](https://assets.leetcode.com/uploads/2022/02/08/ex1drawio.png) +![](ex1drawio.png) **Input:** s = "K1:L2" @@ -28,7 +28,7 @@ The red arrows denote the order in which the cells should be presented. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/02/09/exam2drawio.png) +![](exam2drawio.png) **Input:** s = "A1:F1" diff --git a/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/example1drawio.png b/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/example1drawio.png new file mode 100644 index 000000000..a8cc13acf Binary files /dev/null and b/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/example1drawio.png differ diff --git a/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/example2drawio.png b/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/example2drawio.png new file mode 100644 index 000000000..76c5db89a Binary files /dev/null and b/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/example2drawio.png differ diff --git a/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/readme.md b/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/readme.md index a44c75b91..76906c063 100644 --- a/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/readme.md +++ b/src/main/java/g2101_2200/s2196_create_binary_tree_from_descriptions/readme.md @@ -13,7 +13,7 @@ The test cases will be generated such that the binary tree is **valid**. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/02/09/example1drawio.png) +![](example1drawio.png) **Input:** descriptions = [[20,15,1],[20,17,0],[50,20,1],[50,80,0],[80,19,1]] @@ -25,7 +25,7 @@ The resulting binary tree is shown in the diagram. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/02/09/example2drawio.png) +![](example2drawio.png) **Input:** descriptions = [[1,2,1],[2,3,0],[3,4,1]] diff --git a/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/readme.md b/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/readme.md index 38ac84b7e..338e39e7c 100644 --- a/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/readme.md +++ b/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/readme.md @@ -19,7 +19,7 @@ The test cases are generated such that: **Example 1:** -![](https://assets.leetcode.com/uploads/2019/09/16/untitled-diagram.jpg) +![](untitled-diagram.jpg) **Input:** n = 2, artifacts = [[0,0,0,0],[0,1,1,1]], dig = [[0,0],[0,1]] @@ -29,7 +29,7 @@ The test cases are generated such that: **Example 2:** -![](https://assets.leetcode.com/uploads/2019/09/16/untitled-diagram-1.jpg) +![](untitled-diagram-1.jpg) **Input:** n = 2, artifacts = [[0,0,0,0],[0,1,1,1]], dig = [[0,0],[0,1],[1,1]] diff --git a/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/untitled-diagram-1.jpg b/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/untitled-diagram-1.jpg new file mode 100644 index 000000000..cebd7d0b4 Binary files /dev/null and b/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/untitled-diagram-1.jpg differ diff --git a/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/untitled-diagram.jpg b/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/untitled-diagram.jpg new file mode 100644 index 000000000..dd7e49fdb Binary files /dev/null and b/src/main/java/g2201_2300/s2201_count_artifacts_that_can_be_extracted/untitled-diagram.jpg differ diff --git a/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/example1drawio.png b/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/example1drawio.png new file mode 100644 index 000000000..948e8d8d6 Binary files /dev/null and b/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/example1drawio.png differ diff --git a/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/example2-1drawio.png b/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/example2-1drawio.png new file mode 100644 index 000000000..a05f7cf04 Binary files /dev/null and b/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/example2-1drawio.png differ diff --git a/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/readme.md b/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/readme.md index bff9ee44d..ac5f4cf6b 100644 --- a/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/readme.md +++ b/src/main/java/g2201_2300/s2203_minimum_weighted_subgraph_with_the_required_paths/readme.md @@ -14,7 +14,7 @@ A **subgraph** is a graph whose vertices and edges are subsets of the original g **Example 1:** -![](https://assets.leetcode.com/uploads/2022/02/17/example1drawio.png) +![](example1drawio.png) **Input:** n = 6, edges = [[0,2,2],[0,5,6],[1,0,3],[1,4,5],[2,1,1],[2,3,3],[2,3,4],[3,4,2],[4,5,1]], src1 = 0, src2 = 1, dest = 5 @@ -24,7 +24,7 @@ A **subgraph** is a graph whose vertices and edges are subsets of the original g **Example 2:** -![](https://assets.leetcode.com/uploads/2022/02/17/example2-1drawio.png) +![](example2-1drawio.png) **Input:** n = 3, edges = [[0,1,1],[2,1,1]], src1 = 0, src2 = 1, dest = 2 diff --git a/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/ex1-1.png b/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/ex1-1.png new file mode 100644 index 000000000..6c5bdfb81 Binary files /dev/null and b/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/ex1-1.png differ diff --git a/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/ex2.png b/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/ex2.png new file mode 100644 index 000000000..a39429ca8 Binary files /dev/null and b/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/ex2.png differ diff --git a/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/readme.md b/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/readme.md index 5b1898d7c..cf1ce718d 100644 --- a/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/readme.md +++ b/src/main/java/g2201_2300/s2209_minimum_white_tiles_after_covering_with_carpets/readme.md @@ -13,7 +13,7 @@ Return _the **minimum** number of white tiles still visible._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/02/10/ex1-1.png) +![](ex1-1.png) **Input:** floor = "10110101", numCarpets = 2, carpetLen = 2 @@ -27,7 +27,7 @@ No other way of covering the tiles with the carpets can leave less than 2 white **Example 2:** -![](https://assets.leetcode.com/uploads/2022/02/10/ex2.png) +![](ex2.png) **Input:** floor = "11111", numCarpets = 2, carpetLen = 3 diff --git a/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/ex1.jpg b/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/ex1.jpg new file mode 100644 index 000000000..4559454d8 Binary files /dev/null and b/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/ex1.jpg differ diff --git a/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/ex2new.jpg b/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/ex2new.jpg new file mode 100644 index 000000000..72b3c0496 Binary files /dev/null and b/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/ex2new.jpg differ diff --git a/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/readme.md b/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/readme.md index 236a877dd..05fc01c1f 100644 --- a/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/readme.md +++ b/src/main/java/g2201_2300/s2212_maximum_points_in_an_archery_competition/readme.md @@ -21,7 +21,7 @@ If there are multiple ways for Bob to earn the maximum total points, return **an **Example 1:** -![](https://assets.leetcode.com/uploads/2022/02/24/ex1.jpg) +![](ex1.jpg) **Input:** numArrows = 9, aliceArrows = [1,1,0,1,0,0,2,1,0,1,2,0] @@ -31,7 +31,7 @@ If there are multiple ways for Bob to earn the maximum total points, return **an **Example 2:** -![](https://assets.leetcode.com/uploads/2022/02/24/ex2new.jpg) +![](ex2new.jpg) **Input:** numArrows = 3, aliceArrows = [0,0,1,0,0,0,0,0,0,0,0,2] diff --git a/src/main/java/g2201_2300/s2218_maximum_value_of_k_coins_from_piles/e1.png b/src/main/java/g2201_2300/s2218_maximum_value_of_k_coins_from_piles/e1.png new file mode 100644 index 000000000..daac12a8d Binary files /dev/null and b/src/main/java/g2201_2300/s2218_maximum_value_of_k_coins_from_piles/e1.png differ diff --git a/src/main/java/g2201_2300/s2218_maximum_value_of_k_coins_from_piles/readme.md b/src/main/java/g2201_2300/s2218_maximum_value_of_k_coins_from_piles/readme.md index 9877ef247..bd445e52b 100644 --- a/src/main/java/g2201_2300/s2218_maximum_value_of_k_coins_from_piles/readme.md +++ b/src/main/java/g2201_2300/s2218_maximum_value_of_k_coins_from_piles/readme.md @@ -10,7 +10,7 @@ Given a list `piles`, where `piles[i]` is a list of integers denoting the compos **Example 1:** -![](https://assets.leetcode.com/uploads/2019/11/09/e1.png) +![](e1.png) **Input:** piles = [[1,100,3],[7,8,9]], k = 2 diff --git a/src/main/java/g2201_2300/s2221_find_triangular_sum_of_an_array/ex1drawio.png b/src/main/java/g2201_2300/s2221_find_triangular_sum_of_an_array/ex1drawio.png new file mode 100644 index 000000000..94f6294ae Binary files /dev/null and b/src/main/java/g2201_2300/s2221_find_triangular_sum_of_an_array/ex1drawio.png differ diff --git a/src/main/java/g2201_2300/s2221_find_triangular_sum_of_an_array/readme.md b/src/main/java/g2201_2300/s2221_find_triangular_sum_of_an_array/readme.md index 002296ba5..70501f3d5 100644 --- a/src/main/java/g2201_2300/s2221_find_triangular_sum_of_an_array/readme.md +++ b/src/main/java/g2201_2300/s2221_find_triangular_sum_of_an_array/readme.md @@ -15,7 +15,7 @@ Return _the triangular sum of_ `nums`. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/02/22/ex1drawio.png) +![](ex1drawio.png) **Input:** nums = [1,2,3,4,5] diff --git a/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/graph3drawio-1.png b/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/graph3drawio-1.png new file mode 100644 index 000000000..71b7df4f9 Binary files /dev/null and b/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/graph3drawio-1.png differ diff --git a/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/graph3drawio.png b/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/graph3drawio.png new file mode 100644 index 000000000..98846bac4 Binary files /dev/null and b/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/graph3drawio.png differ diff --git a/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/readme.md b/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/readme.md index 54d1c8dc2..847b5dc6f 100644 --- a/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/readme.md +++ b/src/main/java/g2201_2300/s2236_root_equals_sum_of_children/readme.md @@ -8,7 +8,7 @@ Return `true` _if the value of the root is equal to the **sum** of the values of **Example 1:** -![](https://assets.leetcode.com/uploads/2022/04/08/graph3drawio.png) +![](graph3drawio.png) **Input:** root = [10,4,6] @@ -20,7 +20,7 @@ Return `true` _if the value of the root is equal to the **sum** of the values of **Example 2:** -![](https://assets.leetcode.com/uploads/2022/04/08/graph3drawio-1.png) +![](graph3drawio-1.png) **Input:** root = [5,3,1] diff --git a/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/ex1new3.png b/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/ex1new3.png new file mode 100644 index 000000000..1f927cbaf Binary files /dev/null and b/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/ex1new3.png differ diff --git a/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/ex2.png b/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/ex2.png new file mode 100644 index 000000000..5c4b2e7a7 Binary files /dev/null and b/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/ex2.png differ diff --git a/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/readme.md b/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/readme.md index 0893cf35f..5b0786b37 100644 --- a/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/readme.md +++ b/src/main/java/g2201_2300/s2242_maximum_score_of_a_node_sequence/readme.md @@ -17,7 +17,7 @@ Return _the **maximum score** of a valid node sequence with a length of_ `4`_._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/04/15/ex1new3.png) +![](ex1new3.png) **Input:** scores = [5,2,9,8,4], edges = [[0,1],[1,2],[2,3],[0,2],[1,3],[2,4]] @@ -35,7 +35,7 @@ The sequence [0,3,2,4] is not valid since no edge connects nodes 0 and 3. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/17/ex2.png) +![](ex2.png) **Input:** scores = [9,20,6,4,11,12], edges = [[0,3],[5,3],[2,4],[1,3]] diff --git a/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/ex1new2.jpg b/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/ex1new2.jpg new file mode 100644 index 000000000..02d5dccbb Binary files /dev/null and b/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/ex1new2.jpg differ diff --git a/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/ex2.jpg b/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/ex2.jpg new file mode 100644 index 000000000..4a858dd6d Binary files /dev/null and b/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/ex2.jpg differ diff --git a/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/readme.md b/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/readme.md index 81944ab23..b9a9693fe 100644 --- a/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/readme.md +++ b/src/main/java/g2201_2300/s2245_maximum_trailing_zeros_in_a_cornered_path/readme.md @@ -17,7 +17,7 @@ Note: **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/23/ex1new2.jpg) +![](ex1new2.jpg) **Input:** grid = [[23,17,15,3,20],[8,1,20,27,11],[9,4,6,2,21],[40,9,1,10,6],[22,7,4,5,3]] @@ -36,7 +36,7 @@ The grid on the right is not a cornered path as it requires a return to a previo **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/25/ex2.jpg) +![](ex2.jpg) **Input:** grid = [[4,3,2],[7,6,1],[8,8,8]] diff --git a/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/graph2drawio.png b/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/graph2drawio.png new file mode 100644 index 000000000..04dc12e80 Binary files /dev/null and b/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/graph2drawio.png differ diff --git a/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/readme.md b/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/readme.md index ff5549606..f67ff4514 100644 --- a/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/readme.md +++ b/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/readme.md @@ -10,7 +10,7 @@ Return _the length of the **longest path** in the tree such that no pair of **ad **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/25/testingdrawio.png) +![](testingdrawio.png) **Input:** parent = [-1,0,0,1,1,2], s = "abacbe" @@ -22,7 +22,7 @@ It can be proven that there is no longer path that satisfies the conditions. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/25/graph2drawio.png) +![](graph2drawio.png) **Input:** parent = [-1,0,0,0], s = "aabc" diff --git a/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/testingdrawio.png b/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/testingdrawio.png new file mode 100644 index 000000000..f3e077758 Binary files /dev/null and b/src/main/java/g2201_2300/s2246_longest_path_with_different_adjacent_characters/testingdrawio.png differ diff --git a/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/exa-11.png b/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/exa-11.png new file mode 100644 index 000000000..b7f759884 Binary files /dev/null and b/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/exa-11.png differ diff --git a/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/exa-22.png b/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/exa-22.png new file mode 100644 index 000000000..80d2ee4f1 Binary files /dev/null and b/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/exa-22.png differ diff --git a/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/readme.md b/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/readme.md index e4f157171..ca39a0553 100644 --- a/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/readme.md +++ b/src/main/java/g2201_2300/s2249_count_lattice_points_inside_a_circle/readme.md @@ -11,7 +11,7 @@ Given a 2D integer array `circles` where circles[i] = [xi, yith rectangle **contains** the jth< **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/02/example1.png) +![](example1.png) **Input:** rectangles = [[1,2],[2,3],[2,5]], points = [[2,1],[1,4]] @@ -34,7 +34,7 @@ Therefore, we return [2, 1]. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/02/example2.png) +![](example2.png) **Input:** rectangles = [[1,1],[2,2],[3,3]], points = [[1,3],[1,1]] diff --git a/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/ex1new.jpg b/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/ex1new.jpg new file mode 100644 index 000000000..24dfb5de1 Binary files /dev/null and b/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/ex1new.jpg differ diff --git a/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/ex2new.jpg b/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/ex2new.jpg new file mode 100644 index 000000000..70756c673 Binary files /dev/null and b/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/ex2new.jpg differ diff --git a/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/readme.md b/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/readme.md index 1022efbee..da6f537ae 100644 --- a/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/readme.md +++ b/src/main/java/g2201_2300/s2251_number_of_flowers_in_full_bloom/readme.md @@ -8,7 +8,7 @@ Return _an integer array_ `answer` _of size_ `n`_, where_ `answer[i]` _is the ** **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/02/ex1new.jpg) +![](ex1new.jpg) **Input:** flowers = [[1,6],[3,7],[9,12],[4,13]], persons = [2,3,7,11] @@ -18,7 +18,7 @@ Return _an integer array_ `answer` _of size_ `n`_, where_ `answer[i]` _is the ** **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/02/ex2new.jpg) +![](ex2new.jpg) **Input:** flowers = [[1,10],[3,3]], persons = [3,3,2] diff --git a/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/example1drawio2.png b/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/example1drawio2.png new file mode 100644 index 000000000..1ca001435 Binary files /dev/null and b/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/example1drawio2.png differ diff --git a/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/example2drawio.png b/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/example2drawio.png new file mode 100644 index 000000000..2683e5e8c Binary files /dev/null and b/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/example2drawio.png differ diff --git a/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/readme.md b/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/readme.md index 7c7eb3051..0169a8f17 100644 --- a/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/readme.md +++ b/src/main/java/g2201_2300/s2257_count_unguarded_cells_in_the_grid/readme.md @@ -10,7 +10,7 @@ Return _the number of unoccupied cells that are **not** **guarded**._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/10/example1drawio2.png) +![](example1drawio2.png) **Input:** m = 4, n = 6, guards = [[0,0],[1,1],[2,3]], walls = [[0,1],[2,2],[1,4]] @@ -20,7 +20,7 @@ Return _the number of unoccupied cells that are **not** **guarded**._ **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/10/example2drawio.png) +![](example2drawio.png) **Input:** m = 3, n = 3, guards = [[1,1]], walls = [[0,1],[1,0],[2,1],[1,2]] diff --git a/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex1new.jpg b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex1new.jpg new file mode 100644 index 000000000..fadd3777e Binary files /dev/null and b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex1new.jpg differ diff --git a/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex2new2.jpg b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex2new2.jpg new file mode 100644 index 000000000..363e9c687 Binary files /dev/null and b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex2new2.jpg differ diff --git a/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex3new.jpg b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex3new.jpg new file mode 100644 index 000000000..f1c3cb2eb Binary files /dev/null and b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/ex3new.jpg differ diff --git a/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/readme.md b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/readme.md index 067ebb4ed..248548cfc 100644 --- a/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/readme.md +++ b/src/main/java/g2201_2300/s2258_escape_the_spreading_fire/readme.md @@ -18,7 +18,7 @@ A cell is **adjacent** to another cell if the former is directly north, east, so **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/10/ex1new.jpg) +![](ex1new.jpg) **Input:** grid = [[0,2,0,0,0,0,0],[0,0,0,2,2,1,0],[0,2,0,0,1,2,0],[0,0,2,2,2,0,2],[0,0,0,0,0,0,0]] @@ -32,7 +32,7 @@ Staying for more than 3 minutes will not allow you to safely reach the safehouse **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/10/ex2new2.jpg) +![](ex2new2.jpg) **Input:** grid = [[0,0,0,0],[0,1,2,0],[0,2,0,0]] @@ -46,7 +46,7 @@ Thus, -1 is returned. **Example 3:** -![](https://assets.leetcode.com/uploads/2022/03/10/ex3new.jpg) +![](ex3new.jpg) **Input:** grid = [[0,0,0],[2,2,0],[1,2,0]] diff --git a/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/image-20220315203925-1.png b/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/image-20220315203925-1.png new file mode 100644 index 000000000..ee4beddd7 Binary files /dev/null and b/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/image-20220315203925-1.png differ diff --git a/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/image-20220326133920-1.png b/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/image-20220326133920-1.png new file mode 100644 index 000000000..381b3fa52 Binary files /dev/null and b/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/image-20220326133920-1.png differ diff --git a/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/readme.md b/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/readme.md index 22931b805..7d68de4d2 100644 --- a/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/readme.md +++ b/src/main/java/g2201_2300/s2265_count_nodes_equal_to_average_of_subtree/readme.md @@ -11,7 +11,7 @@ Given the `root` of a binary tree, return _the number of nodes where the value o **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/15/image-20220315203925-1.png) +![](image-20220315203925-1.png) **Input:** root = [4,8,5,0,1,null,6] @@ -31,7 +31,7 @@ For the node with value 6: The average of its subtree is 6 / 1 = 6. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/26/image-20220326133920-1.png) +![](image-20220326133920-1.png) **Input:** root = [1] diff --git a/src/main/java/g2201_2300/s2266_count_number_of_texts/1200px-telephone-keypad2svg.png b/src/main/java/g2201_2300/s2266_count_number_of_texts/1200px-telephone-keypad2svg.png new file mode 100644 index 000000000..cbf69ae96 Binary files /dev/null and b/src/main/java/g2201_2300/s2266_count_number_of_texts/1200px-telephone-keypad2svg.png differ diff --git a/src/main/java/g2201_2300/s2266_count_number_of_texts/readme.md b/src/main/java/g2201_2300/s2266_count_number_of_texts/readme.md index 4e4653f91..b5d3009db 100644 --- a/src/main/java/g2201_2300/s2266_count_number_of_texts/readme.md +++ b/src/main/java/g2201_2300/s2266_count_number_of_texts/readme.md @@ -4,7 +4,7 @@ Medium Alice is texting Bob using her phone. The **mapping** of digits to letters is shown in the figure below. -![](https://assets.leetcode.com/uploads/2022/03/15/1200px-telephone-keypad2svg.png) +![](1200px-telephone-keypad2svg.png) In order to **add** a letter, Alice has to **press** the key of the corresponding digit `i` times, where `i` is the position of the letter in the key. diff --git a/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/example1drawio.png b/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/example1drawio.png new file mode 100644 index 000000000..cda299af0 Binary files /dev/null and b/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/example1drawio.png differ diff --git a/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/example2drawio.png b/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/example2drawio.png new file mode 100644 index 000000000..e318ea6be Binary files /dev/null and b/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/example2drawio.png differ diff --git a/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/readme.md b/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/readme.md index f4a2e4a9b..923b37795 100644 --- a/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/readme.md +++ b/src/main/java/g2201_2300/s2267_check_if_there_is_a_valid_parentheses_string_path/readme.md @@ -19,7 +19,7 @@ Return `true` _if there exists a **valid parentheses string path** in the grid._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/15/example1drawio.png) +![](example1drawio.png) **Input:** grid = [["(","(","("],[")","(",")"],["(","(",")"],["(","(",")"]] @@ -35,7 +35,7 @@ Note that there may be other valid parentheses string paths. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/15/example2drawio.png) +![](example2drawio.png) **Input:** grid = [[")",")"],["(","("]] diff --git a/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/example1drawio3.png b/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/example1drawio3.png new file mode 100644 index 000000000..30cd53389 Binary files /dev/null and b/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/example1drawio3.png differ diff --git a/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/example2drawio.png b/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/example2drawio.png new file mode 100644 index 000000000..6e6da70b1 Binary files /dev/null and b/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/example2drawio.png differ diff --git a/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/readme.md b/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/readme.md index a36c62ec2..19e5b04c0 100644 --- a/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/readme.md +++ b/src/main/java/g2201_2300/s2271_maximum_white_tiles_covered_by_a_carpet/readme.md @@ -10,7 +10,7 @@ Return _the **maximum** number of white tiles that can be covered by the carpet_ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/25/example1drawio3.png) +![](example1drawio3.png) **Input:** tiles = [[1,5],[10,11],[12,18],[20,25],[30,32]], carpetLen = 10 @@ -26,7 +26,7 @@ It can be shown that the carpet cannot cover more than 9 white tiles. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/24/example2drawio.png) +![](example2drawio.png) **Input:** tiles = [[10,11],[1,1]], carpetLen = 2 diff --git a/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/1920px-pushkin_population_historysvg.png b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/1920px-pushkin_population_historysvg.png new file mode 100644 index 000000000..193dbbd5b Binary files /dev/null and b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/1920px-pushkin_population_historysvg.png differ diff --git a/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/ex0.png b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/ex0.png new file mode 100644 index 000000000..70d5b0950 Binary files /dev/null and b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/ex0.png differ diff --git a/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/ex1.png b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/ex1.png new file mode 100644 index 000000000..b897265d6 Binary files /dev/null and b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/ex1.png differ diff --git a/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/readme.md b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/readme.md index 0b2519336..8e48bed61 100644 --- a/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/readme.md +++ b/src/main/java/g2201_2300/s2280_minimum_lines_to_represent_a_line_chart/readme.md @@ -4,13 +4,13 @@ Medium You are given a 2D integer array `stockPrices` where stockPrices[i] = [dayi, pricei] indicates the price of the stock on day dayi is pricei. A **line chart** is created from the array by plotting the points on an XY plane with the X-axis representing the day and the Y-axis representing the price and connecting adjacent points. One such example is shown below: -![](https://assets.leetcode.com/uploads/2022/03/30/1920px-pushkin_population_historysvg.png) +![](1920px-pushkin_population_historysvg.png) Return _the **minimum number of lines** needed to represent the line chart_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/03/30/ex0.png) +![](ex0.png) **Input:** stockPrices = [[1,7],[2,6],[3,5],[4,4],[5,4],[6,3],[7,2],[8,1]] @@ -32,7 +32,7 @@ It can be shown that it is not possible to represent the line chart using less t **Example 2:** -![](https://assets.leetcode.com/uploads/2022/03/30/ex1.png) +![](ex1.png) **Input:** stockPrices = [[3,4],[1,2],[7,8],[2,3]] diff --git a/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/ex1drawio.png b/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/ex1drawio.png new file mode 100644 index 000000000..3dc7f3e90 Binary files /dev/null and b/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/ex1drawio.png differ diff --git a/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/ex2drawio.png b/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/ex2drawio.png new file mode 100644 index 000000000..35e168939 Binary files /dev/null and b/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/ex2drawio.png differ diff --git a/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/readme.md b/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/readme.md index 2b6c2cc4f..40d9f0654 100644 --- a/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/readme.md +++ b/src/main/java/g2201_2300/s2285_maximum_total_importance_of_roads/readme.md @@ -12,7 +12,7 @@ Return _the **maximum total importance** of all roads possible after assigning t **Example 1:** -![](https://assets.leetcode.com/uploads/2022/04/07/ex1drawio.png) +![](ex1drawio.png) **Input:** n = 5, roads = [[0,1],[1,2],[2,3],[0,2],[1,3],[2,4]] @@ -38,7 +38,7 @@ It can be shown that we cannot obtain a greater total importance than 43. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/04/07/ex2drawio.png) +![](ex2drawio.png) **Input:** n = 5, roads = [[0,3],[2,4],[1,3]] diff --git a/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/example1drawio-1.png b/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/example1drawio-1.png new file mode 100644 index 000000000..6cc8d658f Binary files /dev/null and b/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/example1drawio-1.png differ diff --git a/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/example1drawio.png b/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/example1drawio.png new file mode 100644 index 000000000..05adcfbc9 Binary files /dev/null and b/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/example1drawio.png differ diff --git a/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/readme.md b/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/readme.md index 6365ae513..7c68ffc87 100644 --- a/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/readme.md +++ b/src/main/java/g2201_2300/s2290_minimum_obstacle_removal_to_reach_corner/readme.md @@ -13,7 +13,7 @@ Return _the **minimum** number of **obstacles** to **remove** so you can move fr **Example 1:** -![](https://assets.leetcode.com/uploads/2022/04/06/example1drawio-1.png) +![](example1drawio-1.png) **Input:** grid = [[0,1,1],[1,1,0],[1,1,0]] @@ -27,7 +27,7 @@ Note that there may be other ways to remove 2 obstacles to create a path. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/04/06/example1drawio.png) +![](example1drawio.png) **Input:** grid = [[0,1,0,0,0],[0,1,0,1,0],[0,0,0,1,0]] diff --git a/src/main/java/g2201_2300/s2293_min_max_game/example1drawio-1.png b/src/main/java/g2201_2300/s2293_min_max_game/example1drawio-1.png new file mode 100644 index 000000000..2a4c3810b Binary files /dev/null and b/src/main/java/g2201_2300/s2293_min_max_game/example1drawio-1.png differ diff --git a/src/main/java/g2201_2300/s2293_min_max_game/readme.md b/src/main/java/g2201_2300/s2293_min_max_game/readme.md index 85f822fe8..c9340203e 100644 --- a/src/main/java/g2201_2300/s2293_min_max_game/readme.md +++ b/src/main/java/g2201_2300/s2293_min_max_game/readme.md @@ -16,7 +16,7 @@ Return _the last number that remains in_ `nums` _after applying the algorithm._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/04/13/example1drawio-1.png) +![](example1drawio-1.png) **Input:** nums = [1,3,5,2,4,8,2,2] diff --git a/src/main/java/g2301_2400/s2304_minimum_path_cost_in_a_grid/griddrawio-2.png b/src/main/java/g2301_2400/s2304_minimum_path_cost_in_a_grid/griddrawio-2.png new file mode 100644 index 000000000..d17411389 Binary files /dev/null and b/src/main/java/g2301_2400/s2304_minimum_path_cost_in_a_grid/griddrawio-2.png differ diff --git a/src/main/java/g2301_2400/s2304_minimum_path_cost_in_a_grid/readme.md b/src/main/java/g2301_2400/s2304_minimum_path_cost_in_a_grid/readme.md index dd61841ac..8114e2870 100644 --- a/src/main/java/g2301_2400/s2304_minimum_path_cost_in_a_grid/readme.md +++ b/src/main/java/g2301_2400/s2304_minimum_path_cost_in_a_grid/readme.md @@ -10,7 +10,7 @@ The cost of a path in `grid` is the **sum** of all values of cells visited plus **Example 1:** -![](https://assets.leetcode.com/uploads/2022/04/28/griddrawio-2.png) +![](griddrawio-2.png) **Input:** grid = [[5,3],[4,0],[2,1]], moveCost = [[9,8],[1,5],[10,12],[18,6],[2,4],[14,3]] diff --git a/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/ex1.png b/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/ex1.png new file mode 100644 index 000000000..1f9a237b3 Binary files /dev/null and b/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/ex1.png differ diff --git a/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/ex2new.png b/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/ex2new.png new file mode 100644 index 000000000..fa051d8f9 Binary files /dev/null and b/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/ex2new.png differ diff --git a/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/readme.md b/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/readme.md index 749d891a3..0bd1cf72e 100644 --- a/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/readme.md +++ b/src/main/java/g2301_2400/s2312_selling_pieces_of_wood/readme.md @@ -12,7 +12,7 @@ Note that you can cut the piece of wood as many times as you want. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/04/27/ex1.png) +![](ex1.png) **Input:** m = 3, n = 5, prices = [[1,4,2],[2,2,7],[2,1,3]] @@ -32,7 +32,7 @@ It can be shown that 19 is the maximum amount of money that can be earned. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/04/27/ex2new.png) +![](ex2new.png) **Input:** m = 4, n = 6, prices = [[3,2,10],[1,4,2],[4,1,3]] diff --git a/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/readme.md b/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/readme.md index e0076205d..6d79733cb 100644 --- a/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/readme.md +++ b/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/readme.md @@ -8,7 +8,7 @@ Return _the **number of pairs** of different nodes that are **unreachable** from **Example 1:** -![](https://assets.leetcode.com/uploads/2022/05/05/tc-3.png) +![](tc-3.png) **Input:** n = 3, edges = [[0,1],[0,2],[1,2]] @@ -20,7 +20,7 @@ Therefore, we return 0. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/05/05/tc-2.png) +![](tc-2.png) **Input:** n = 7, edges = [[0,2],[0,5],[2,4],[1,6],[5,4]] diff --git a/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/tc-2.png b/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/tc-2.png new file mode 100644 index 000000000..ae9689554 Binary files /dev/null and b/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/tc-2.png differ diff --git a/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/tc-3.png b/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/tc-3.png new file mode 100644 index 000000000..5a5aaa71e Binary files /dev/null and b/src/main/java/g2301_2400/s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph/tc-3.png differ diff --git a/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/ex1.jpg b/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/ex1.jpg new file mode 100644 index 000000000..316f151fc Binary files /dev/null and b/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/ex1.jpg differ diff --git a/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/ex2.jpg b/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/ex2.jpg new file mode 100644 index 000000000..3a0e558f1 Binary files /dev/null and b/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/ex2.jpg differ diff --git a/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/readme.md b/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/readme.md index 8fd78b50c..95881150a 100644 --- a/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/readme.md +++ b/src/main/java/g2301_2400/s2319_check_if_matrix_is_x_matrix/readme.md @@ -11,7 +11,7 @@ Given a 2D integer array `grid` of size `n x n` representing a square matrix, re **Example 1:** -![](https://assets.leetcode.com/uploads/2022/05/03/ex1.jpg) +![](ex1.jpg) **Input:** grid = [[2,0,0,1],[0,3,1,0],[0,5,2,0],[4,0,0,2]] @@ -25,7 +25,7 @@ Thus, grid is an X-Matrix. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/05/03/ex2.jpg) +![](ex2.jpg) **Input:** grid = [[5,7,0],[0,3,1],[0,5,0]] diff --git a/src/main/java/g2301_2400/s2320_count_number_of_ways_to_place_houses/arrangements.png b/src/main/java/g2301_2400/s2320_count_number_of_ways_to_place_houses/arrangements.png new file mode 100644 index 000000000..487b1086e Binary files /dev/null and b/src/main/java/g2301_2400/s2320_count_number_of_ways_to_place_houses/arrangements.png differ diff --git a/src/main/java/g2301_2400/s2320_count_number_of_ways_to_place_houses/readme.md b/src/main/java/g2301_2400/s2320_count_number_of_ways_to_place_houses/readme.md index f1e0c6e7e..70e850112 100644 --- a/src/main/java/g2301_2400/s2320_count_number_of_ways_to_place_houses/readme.md +++ b/src/main/java/g2301_2400/s2320_count_number_of_ways_to_place_houses/readme.md @@ -28,7 +28,7 @@ Possible arrangements: **Example 2:** -![](https://assets.leetcode.com/uploads/2022/05/12/arrangements.png) +![](arrangements.png) **Input:** n = 2 diff --git a/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/ex1drawio.png b/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/ex1drawio.png new file mode 100644 index 000000000..b25151a62 Binary files /dev/null and b/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/ex1drawio.png differ diff --git a/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/ex2drawio.png b/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/ex2drawio.png new file mode 100644 index 000000000..854d7dd00 Binary files /dev/null and b/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/ex2drawio.png differ diff --git a/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/readme.md b/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/readme.md index 4ee2db0b7..5511d8e76 100644 --- a/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/readme.md +++ b/src/main/java/g2301_2400/s2322_minimum_score_after_removals_on_a_tree/readme.md @@ -17,7 +17,7 @@ Return _the **minimum** score of any possible pair of edge removals on the given **Example 1:** -![](https://assets.leetcode.com/uploads/2022/05/03/ex1drawio.png) +![](ex1drawio.png) **Input:** nums = [1,5,5,4,11], edges = [[0,1],[1,2],[1,3],[3,4]] @@ -37,7 +37,7 @@ It can be shown that no other pair of removals will obtain a smaller score than **Example 2:** -![](https://assets.leetcode.com/uploads/2022/05/03/ex2drawio.png) +![](ex2drawio.png) **Input:** nums = [5,5,2,4,4,2], edges = [[0,1],[1,2],[5,2],[4,3],[1,3]] diff --git a/src/main/java/g2301_2400/s2325_decode_the_message/ex1new4.jpg b/src/main/java/g2301_2400/s2325_decode_the_message/ex1new4.jpg new file mode 100644 index 000000000..aceb9ff87 Binary files /dev/null and b/src/main/java/g2301_2400/s2325_decode_the_message/ex1new4.jpg differ diff --git a/src/main/java/g2301_2400/s2325_decode_the_message/ex2new.jpg b/src/main/java/g2301_2400/s2325_decode_the_message/ex2new.jpg new file mode 100644 index 000000000..781290043 Binary files /dev/null and b/src/main/java/g2301_2400/s2325_decode_the_message/ex2new.jpg differ diff --git a/src/main/java/g2301_2400/s2325_decode_the_message/readme.md b/src/main/java/g2301_2400/s2325_decode_the_message/readme.md index fca1c525b..876463010 100644 --- a/src/main/java/g2301_2400/s2325_decode_the_message/readme.md +++ b/src/main/java/g2301_2400/s2325_decode_the_message/readme.md @@ -15,7 +15,7 @@ Return _the decoded message_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/05/08/ex1new4.jpg) +![](ex1new4.jpg) **Input:** key = "the quick brown fox jumps over the lazy dog", message = "vkbs bs t suepuv" @@ -27,7 +27,7 @@ It is obtained by taking the first appearance of each letter in "**the** 2 -> 3 is not a good path because vals[2] > vals[0]. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/08/04/149d3065ec165a71a1b9aec890776ff.png) +![](149d3065ec165a71a1b9aec890776ff.png) **Input:** vals = [1,1,2,2,3], edges = [[0,1],[1,2],[2,3],[2,4]] @@ -45,7 +45,7 @@ There are 2 additional good paths: 0 -> 1 and 2 -> 3. **Example 3:** -![](https://assets.leetcode.com/uploads/2022/08/04/31705e22af3d9c0a557459bc7d1b62d.png) +![](31705e22af3d9c0a557459bc7d1b62d.png) **Input:** vals = [1], edges = [] diff --git a/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/1.jpg b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/1.jpg new file mode 100644 index 000000000..a604b7a70 Binary files /dev/null and b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/1.jpg differ diff --git a/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/2.jpg b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/2.jpg new file mode 100644 index 000000000..3b1ba8fc4 Binary files /dev/null and b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/2.jpg differ diff --git a/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/img.jpg b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/img.jpg new file mode 100644 index 000000000..38353fbbf Binary files /dev/null and b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/img.jpg differ diff --git a/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/readme.md b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/readme.md index f6b9e8f78..dda7e01c2 100644 --- a/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/readme.md +++ b/src/main/java/g2401_2500/s2428_maximum_sum_of_an_hourglass/readme.md @@ -6,7 +6,7 @@ You are given an `m x n` integer matrix `grid`. We define an **hourglass** as a part of the matrix with the following form: -![](https://assets.leetcode.com/uploads/2022/08/21/img.jpg) +![](img.jpg) Return _the **maximum** sum of the elements of an hourglass_. @@ -14,7 +14,7 @@ Return _the **maximum** sum of the elements of an hourglass_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/08/21/1.jpg) +![](1.jpg) **Input:** grid = [[6,2,1,3],[4,2,1,5],[9,2,8,7],[4,1,2,9]] @@ -24,7 +24,7 @@ Return _the **maximum** sum of the elements of an hourglass_. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/08/21/2.jpg) +![](2.jpg) **Input:** grid = [[1,2,3],[4,5,6],[7,8,9]] diff --git a/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220812224605-3.png b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220812224605-3.png new file mode 100644 index 000000000..62a0d72f6 Binary files /dev/null and b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220812224605-3.png differ diff --git a/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220813183124-1.png b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220813183124-1.png new file mode 100644 index 000000000..36f7b5f12 Binary files /dev/null and b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220813183124-1.png differ diff --git a/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220817112930-3.png b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220817112930-3.png new file mode 100644 index 000000000..8e2c8f0f6 Binary files /dev/null and b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/image-20220817112930-3.png differ diff --git a/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/readme.md b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/readme.md index bf8d4080b..477864d79 100644 --- a/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/readme.md +++ b/src/main/java/g2401_2500/s2435_paths_in_matrix_whose_sum_is_divisible_by_k/readme.md @@ -8,7 +8,7 @@ Return _the number of paths where the sum of the elements on the path is divisib **Example 1:** -![](https://assets.leetcode.com/uploads/2022/08/13/image-20220813183124-1.png) +![](image-20220813183124-1.png) **Input:** grid = [[5,2,4],[3,0,5],[0,7,2]], k = 3 @@ -18,7 +18,7 @@ Return _the number of paths where the sum of the elements on the path is divisib **Example 2:** -![](https://assets.leetcode.com/uploads/2022/08/17/image-20220817112930-3.png) +![](image-20220817112930-3.png) **Input:** grid = [[0,0]], k = 5 @@ -28,7 +28,7 @@ Return _the number of paths where the sum of the elements on the path is divisib **Example 3:** -![](https://assets.leetcode.com/uploads/2022/08/12/image-20220812224605-3.png) +![](image-20220812224605-3.png) **Input:** grid = [[7,3,4,9],[2,3,6,2],[2,3,7,0]], k = 1 diff --git a/src/main/java/g2401_2500/s2440_create_components_with_same_value/diagramdrawio.png b/src/main/java/g2401_2500/s2440_create_components_with_same_value/diagramdrawio.png new file mode 100644 index 000000000..697f424a6 Binary files /dev/null and b/src/main/java/g2401_2500/s2440_create_components_with_same_value/diagramdrawio.png differ diff --git a/src/main/java/g2401_2500/s2440_create_components_with_same_value/readme.md b/src/main/java/g2401_2500/s2440_create_components_with_same_value/readme.md index 3a96174f2..bd0423116 100644 --- a/src/main/java/g2401_2500/s2440_create_components_with_same_value/readme.md +++ b/src/main/java/g2401_2500/s2440_create_components_with_same_value/readme.md @@ -12,7 +12,7 @@ Return _the **maximum** number of edges you can delete, such that every connecte **Example 1:** -![](https://assets.leetcode.com/uploads/2022/08/26/diagramdrawio.png) +![](diagramdrawio.png) **Input:** nums = [6,2,2,2,6], edges = [[0,1],[1,2],[1,3],[3,4]] diff --git a/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/binaryytreeedrawio-1.png b/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/binaryytreeedrawio-1.png new file mode 100644 index 000000000..5dedf2b6c Binary files /dev/null and b/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/binaryytreeedrawio-1.png differ diff --git a/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/binaryytreeedrawio-2.png b/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/binaryytreeedrawio-2.png new file mode 100644 index 000000000..034733fad Binary files /dev/null and b/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/binaryytreeedrawio-2.png differ diff --git a/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/readme.md b/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/readme.md index 7f8bdca85..d5ea2b5cc 100644 --- a/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/readme.md +++ b/src/main/java/g2401_2500/s2458_height_of_binary_tree_after_subtree_removal_queries/readme.md @@ -17,7 +17,7 @@ Return _an array_ `answer` _of size_ `m` _where_ `answer[i]` _is the height of t **Example 1:** -![](https://assets.leetcode.com/uploads/2022/09/07/binaryytreeedrawio-1.png) +![](binaryytreeedrawio-1.png) **Input:** root = [1,3,4,2,null,6,5,null,null,null,null,null,7], queries = [4] @@ -27,7 +27,7 @@ Return _an array_ `answer` _of size_ `m` _where_ `answer[i]` _is the height of t **Example 2:** -![](https://assets.leetcode.com/uploads/2022/09/07/binaryytreeedrawio-2.png) +![](binaryytreeedrawio-2.png) **Input:** root = [5,8,9,2,1,3,7,4,6], queries = [3,2,4,8] diff --git a/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/example-2.jpg b/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/example-2.jpg new file mode 100644 index 000000000..62b298df8 Binary files /dev/null and b/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/example-2.jpg differ diff --git a/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/example1.jpg b/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/example1.jpg new file mode 100644 index 000000000..4cbde3bd8 Binary files /dev/null and b/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/example1.jpg differ diff --git a/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/readme.md b/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/readme.md index 59233442d..472236a9d 100644 --- a/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/readme.md +++ b/src/main/java/g2401_2500/s2463_minimum_total_distance_traveled/readme.md @@ -22,7 +22,7 @@ Return _the minimum total distance traveled by all the robots_. The test cases a **Example 1:** -![](https://assets.leetcode.com/uploads/2022/09/15/example1.jpg) +![](example1.jpg) **Input:** robot = [0,4,6], factory = [[2,2],[6,2]] @@ -44,7 +44,7 @@ The total distance is |2 - 0| + |2 - 4| + |6 - 6| = 4. It can be shown that we c **Example 2:** -![](https://assets.leetcode.com/uploads/2022/09/15/example-2.jpg) +![](example-2.jpg) **Input:** robot = [1,-1], factory = [[-2,1],[2,1]] diff --git a/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/eg1.png b/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/eg1.png new file mode 100644 index 000000000..2a5df3d20 Binary files /dev/null and b/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/eg1.png differ diff --git a/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/eg2.png b/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/eg2.png new file mode 100644 index 000000000..7ab632510 Binary files /dev/null and b/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/eg2.png differ diff --git a/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/readme.md b/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/readme.md index 0005394be..b84f791d6 100644 --- a/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/readme.md +++ b/src/main/java/g2401_2500/s2467_most_profitable_path_in_a_tree/readme.md @@ -22,7 +22,7 @@ Return _the **maximum** net income Alice can have if she travels towards the opt **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/29/eg1.png) +![](eg1.png) **Input:** edges = [[0,1],[1,2],[1,3],[3,4]], bob = 3, amount = [-2,4,2,-4,6] @@ -54,7 +54,7 @@ It is not possible for Alice to get a higher net income. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/10/29/eg2.png) +![](eg2.png) **Input:** edges = [[0,1]], bob = 1, amount = [-7280,2350] diff --git a/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174006-2.png b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174006-2.png new file mode 100644 index 000000000..d0ddd7c67 Binary files /dev/null and b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174006-2.png differ diff --git a/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174026-3.png b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174026-3.png new file mode 100644 index 000000000..428c908ba Binary files /dev/null and b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174026-3.png differ diff --git a/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174052-4.png b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174052-4.png new file mode 100644 index 000000000..5beecc724 Binary files /dev/null and b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/image-20220918174052-4.png differ diff --git a/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/readme.md b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/readme.md index 7bc1a638f..1593dbe5b 100644 --- a/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/readme.md +++ b/src/main/java/g2401_2500/s2471_minimum_number_of_operations_to_sort_a_binary_tree_by_level/readme.md @@ -12,7 +12,7 @@ The **level** of a node is the number of edges along the path between it and the **Example 1:** -![](https://assets.leetcode.com/uploads/2022/09/18/image-20220918174006-2.png) +![](image-20220918174006-2.png) **Input:** root = [1,4,3,7,6,8,5,null,null,null,null,9,null,10] @@ -27,7 +27,7 @@ We used 3 operations so return 3. It can be proven that 3 is the minimum number **Example 2:** -![](https://assets.leetcode.com/uploads/2022/09/18/image-20220918174026-3.png) +![](image-20220918174026-3.png) **Input:** root = [1,3,2,7,6,5,4] @@ -42,7 +42,7 @@ We used 3 operations so return 3. It can be proven that 3 is the minimum number **Example 3:** -![](https://assets.leetcode.com/uploads/2022/09/18/image-20220918174052-4.png) +![](image-20220918174052-4.png) **Input:** root = [1,2,3,4,5,6] diff --git a/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/bstreeedrawioo.png b/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/bstreeedrawioo.png new file mode 100644 index 000000000..e8ef696ab Binary files /dev/null and b/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/bstreeedrawioo.png differ diff --git a/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/bstttreee.png b/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/bstttreee.png new file mode 100644 index 000000000..8dafa2a89 Binary files /dev/null and b/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/bstttreee.png differ diff --git a/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/readme.md b/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/readme.md index c6e5cccb2..20a24c9cc 100644 --- a/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/readme.md +++ b/src/main/java/g2401_2500/s2476_closest_nodes_queries_in_a_binary_search_tree/readme.md @@ -13,7 +13,7 @@ Return _the array_ `answer`. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/09/28/bstreeedrawioo.png) +![](bstreeedrawioo.png) **Input:** root = [6,2,13,1,4,9,15,null,null,null,null,null,null,14], queries = [2,5,16] @@ -26,7 +26,7 @@ Return _the array_ `answer`. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/09/28/bstttreee.png) +![](bstttreee.png) **Input:** root = [4,null,9], queries = [3] diff --git a/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/2.png b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/2.png new file mode 100644 index 000000000..4110fd625 Binary files /dev/null and b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/2.png differ diff --git a/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/a4c380025e3ff0c379525e96a7d63a3.png b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/a4c380025e3ff0c379525e96a7d63a3.png new file mode 100644 index 000000000..bd6334a9a Binary files /dev/null and b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/a4c380025e3ff0c379525e96a7d63a3.png differ diff --git a/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/efcf7f7be6830b8763639cfd01b690a.png b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/efcf7f7be6830b8763639cfd01b690a.png new file mode 100644 index 000000000..c8bdd3879 Binary files /dev/null and b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/efcf7f7be6830b8763639cfd01b690a.png differ diff --git a/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/readme.md b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/readme.md index ca54355d4..1b28a0a97 100644 --- a/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/readme.md +++ b/src/main/java/g2401_2500/s2477_minimum_fuel_cost_to_report_to_the_capital/readme.md @@ -14,7 +14,7 @@ Return _the minimum number of liters of fuel to reach the capital city_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/09/22/a4c380025e3ff0c379525e96a7d63a3.png) +![](a4c380025e3ff0c379525e96a7d63a3.png) **Input:** roads = [[0,1],[0,2],[0,3]], seats = 5 @@ -29,7 +29,7 @@ It costs 3 liters of fuel at minimum. It can be proven that 3 is the minimum num **Example 2:** -![](https://assets.leetcode.com/uploads/2022/11/16/2.png) +![](2.png) **Input:** roads = [[3,1],[3,2],[1,0],[0,4],[0,5],[4,6]], seats = 2 @@ -49,7 +49,7 @@ It can be proven that 7 is the minimum number of liters of fuel needed. **Example 3:** -![](https://assets.leetcode.com/uploads/2022/09/27/efcf7f7be6830b8763639cfd01b690a.png) +![](efcf7f7be6830b8763639cfd01b690a.png) **Input:** roads = [], seats = 1 diff --git a/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/11drawio.png b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/11drawio.png new file mode 100644 index 000000000..94b459921 Binary files /dev/null and b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/11drawio.png differ diff --git a/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/22drawio.png b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/22drawio.png new file mode 100644 index 000000000..0e4462671 Binary files /dev/null and b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/22drawio.png differ diff --git a/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/alldrawio.png b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/alldrawio.png new file mode 100644 index 000000000..41a67b3db Binary files /dev/null and b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/alldrawio.png differ diff --git a/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/readme.md b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/readme.md index 85b8b693f..44bf4ecfd 100644 --- a/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/readme.md +++ b/src/main/java/g2401_2500/s2481_minimum_cuts_to_divide_a_circle/readme.md @@ -9,13 +9,13 @@ A **valid cut** in a circle can be: Some valid and invalid cuts are shown in the figures below. -![](https://assets.leetcode.com/uploads/2022/10/29/alldrawio.png) +![](alldrawio.png) Given the integer `n`, return _the **minimum** number of cuts needed to divide a circle into_ `n` _equal slices_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/24/11drawio.png) +![](11drawio.png) **Input:** n = 4 @@ -25,7 +25,7 @@ Given the integer `n`, return _the **minimum** number of cuts needed to divide a **Example 2:** -![](https://assets.leetcode.com/uploads/2022/10/24/22drawio.png) +![](22drawio.png) **Input:** n = 3 diff --git a/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/image-20221106171729-5.png b/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/image-20221106171729-5.png new file mode 100644 index 000000000..273c879b6 Binary files /dev/null and b/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/image-20221106171729-5.png differ diff --git a/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/image-20221106171747-6.png b/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/image-20221106171747-6.png new file mode 100644 index 000000000..e97bf6b9b Binary files /dev/null and b/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/image-20221106171747-6.png differ diff --git a/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/readme.md b/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/readme.md index 2e153eb9d..ac9c40b16 100644 --- a/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/readme.md +++ b/src/main/java/g2401_2500/s2482_difference_between_ones_and_zeros_in_row_and_column/readme.md @@ -16,7 +16,7 @@ Return _the difference matrix_ `diff`. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/11/06/image-20221106171729-5.png) +![](image-20221106171729-5.png) **Input:** grid = [[0,1,1],[1,0,1],[0,0,1]] @@ -35,7 +35,7 @@ Return _the difference matrix_ `diff`. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/11/06/image-20221106171747-6.png) +![](image-20221106171747-6.png) **Input:** grid = [[1,1,1],[1,1,1]] diff --git a/src/main/java/g2401_2500/s2487_remove_nodes_from_linked_list/drawio.png b/src/main/java/g2401_2500/s2487_remove_nodes_from_linked_list/drawio.png new file mode 100644 index 000000000..48570d1d7 Binary files /dev/null and b/src/main/java/g2401_2500/s2487_remove_nodes_from_linked_list/drawio.png differ diff --git a/src/main/java/g2401_2500/s2487_remove_nodes_from_linked_list/readme.md b/src/main/java/g2401_2500/s2487_remove_nodes_from_linked_list/readme.md index 751d1b735..4c5a4a294 100644 --- a/src/main/java/g2401_2500/s2487_remove_nodes_from_linked_list/readme.md +++ b/src/main/java/g2401_2500/s2487_remove_nodes_from_linked_list/readme.md @@ -10,7 +10,7 @@ Return _the_ `head` _of the modified linked list._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/02/drawio.png) +![](drawio.png) **Input:** head = [5,2,13,3,8] diff --git a/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/graph11.png b/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/graph11.png new file mode 100644 index 000000000..e016a639f Binary files /dev/null and b/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/graph11.png differ diff --git a/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/graph22.png b/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/graph22.png new file mode 100644 index 000000000..bbc00d938 Binary files /dev/null and b/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/graph22.png differ diff --git a/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/readme.md b/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/readme.md index 72d6fadf4..5f2a743a0 100644 --- a/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/readme.md +++ b/src/main/java/g2401_2500/s2492_minimum_score_of_a_path_between_two_cities/readme.md @@ -16,7 +16,7 @@ Return _the **minimum** possible score of a path between cities_ `1` _and_ `n`. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/12/graph11.png) +![](graph11.png) **Input:** n = 4, roads = [[1,2,9],[2,3,6],[2,4,5],[1,4,7]] @@ -26,7 +26,7 @@ Return _the **minimum** possible score of a path between cities_ `1` _and_ `n`. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/10/12/graph22.png) +![](graph22.png) **Input:** n = 4, roads = [[1,2,2],[1,3,4],[3,4,7]] diff --git a/src/main/java/g2401_2500/s2493_divide_nodes_into_the_maximum_number_of_groups/example1.png b/src/main/java/g2401_2500/s2493_divide_nodes_into_the_maximum_number_of_groups/example1.png new file mode 100644 index 000000000..b59d3cd9a Binary files /dev/null and b/src/main/java/g2401_2500/s2493_divide_nodes_into_the_maximum_number_of_groups/example1.png differ diff --git a/src/main/java/g2401_2500/s2493_divide_nodes_into_the_maximum_number_of_groups/readme.md b/src/main/java/g2401_2500/s2493_divide_nodes_into_the_maximum_number_of_groups/readme.md index 551b227f9..e4855f576 100644 --- a/src/main/java/g2401_2500/s2493_divide_nodes_into_the_maximum_number_of_groups/readme.md +++ b/src/main/java/g2401_2500/s2493_divide_nodes_into_the_maximum_number_of_groups/readme.md @@ -15,7 +15,7 @@ Return _the maximum number of groups (i.e., maximum_ `m`_) into which you can di **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/13/example1.png) +![](example1.png) **Input:** n = 6, edges = [[1,2],[1,4],[1,5],[2,6],[2,3],[4,6]] diff --git a/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/max-star-sum-descdrawio.png b/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/max-star-sum-descdrawio.png new file mode 100644 index 000000000..e01d7f6b3 Binary files /dev/null and b/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/max-star-sum-descdrawio.png differ diff --git a/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/max-star-sum-example1drawio.png b/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/max-star-sum-example1drawio.png new file mode 100644 index 000000000..60bb45ec3 Binary files /dev/null and b/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/max-star-sum-example1drawio.png differ diff --git a/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/readme.md b/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/readme.md index d804964bc..02fa16161 100644 --- a/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/readme.md +++ b/src/main/java/g2401_2500/s2497_maximum_star_sum_of_a_graph/readme.md @@ -10,7 +10,7 @@ A **star graph** is a subgraph of the given graph having a center node containin The image below shows star graphs with `3` and `4` neighbors respectively, centered at the blue node. -![](https://assets.leetcode.com/uploads/2022/11/07/max-star-sum-descdrawio.png) +![](max-star-sum-descdrawio.png) The **star sum** is the sum of the values of all the nodes present in the star graph. @@ -18,7 +18,7 @@ Given an integer `k`, return _the **maximum star sum** of a star graph containin **Example 1:** -![](https://assets.leetcode.com/uploads/2022/11/07/max-star-sum-example1drawio.png) +![](max-star-sum-example1drawio.png) **Input:** vals = [1,2,3,4,10,-10,-20], edges = [[0,1],[1,2],[1,3],[3,4],[3,5],[3,6]], k = 2 diff --git a/src/main/java/g2401_2500/s2498_frog_jump_ii/example-1.png b/src/main/java/g2401_2500/s2498_frog_jump_ii/example-1.png new file mode 100644 index 000000000..f6966797c Binary files /dev/null and b/src/main/java/g2401_2500/s2498_frog_jump_ii/example-1.png differ diff --git a/src/main/java/g2401_2500/s2498_frog_jump_ii/example-2.png b/src/main/java/g2401_2500/s2498_frog_jump_ii/example-2.png new file mode 100644 index 000000000..85501f682 Binary files /dev/null and b/src/main/java/g2401_2500/s2498_frog_jump_ii/example-2.png differ diff --git a/src/main/java/g2401_2500/s2498_frog_jump_ii/readme.md b/src/main/java/g2401_2500/s2498_frog_jump_ii/readme.md index 3803d629f..effad7fd9 100644 --- a/src/main/java/g2401_2500/s2498_frog_jump_ii/readme.md +++ b/src/main/java/g2401_2500/s2498_frog_jump_ii/readme.md @@ -16,7 +16,7 @@ Return _the **minimum** cost of a path for the frog_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/11/14/example-1.png) +![](example-1.png) **Input:** stones = [0,2,5,6,7] @@ -30,7 +30,7 @@ Since it is not possible to achieve a cost of less than 5, we return it. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/11/14/example-2.png) +![](example-2.png) **Input:** stones = [0,3,9] diff --git a/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/q1ex1.jpg b/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/q1ex1.jpg new file mode 100644 index 000000000..39ab3e6a3 Binary files /dev/null and b/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/q1ex1.jpg differ diff --git a/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/q1ex2.jpg b/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/q1ex2.jpg new file mode 100644 index 000000000..9e29da58e Binary files /dev/null and b/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/q1ex2.jpg differ diff --git a/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/readme.md b/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/readme.md index 1b804d604..5e0028906 100644 --- a/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/readme.md +++ b/src/main/java/g2401_2500/s2500_delete_greatest_value_in_each_row/readme.md @@ -15,7 +15,7 @@ Return _the answer after performing the operations described above_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/19/q1ex1.jpg) +![](q1ex1.jpg) **Input:** grid = [[1,2,4],[3,3,1]] @@ -33,7 +33,7 @@ The final answer = 4 + 3 + 1 = 8. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/10/19/q1ex2.jpg) +![](q1ex2.jpg) **Input:** grid = [[10]] diff --git a/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/readme.md b/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/readme.md index c8507bca3..cecde8213 100644 --- a/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/readme.md +++ b/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/readme.md @@ -15,7 +15,7 @@ Return _the resulting array_ `answer`. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/19/yetgriddrawio.png) +![](yetgriddrawio.png) **Input:** grid = [[1,2,3],[2,5,7],[3,5,1]], queries = [5,6,2] @@ -25,7 +25,7 @@ Return _the resulting array_ `answer`. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/10/20/yetgriddrawio-2.png) +![](yetgriddrawio-2.png) **Input:** grid = [[5,2,1],[1,1,2]], queries = [3] diff --git a/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/yetgriddrawio-2.png b/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/yetgriddrawio-2.png new file mode 100644 index 000000000..3643db517 Binary files /dev/null and b/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/yetgriddrawio-2.png differ diff --git a/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/yetgriddrawio.png b/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/yetgriddrawio.png new file mode 100644 index 000000000..91e5a95ba Binary files /dev/null and b/src/main/java/g2501_2600/s2503_maximum_number_of_points_from_grid_queries/yetgriddrawio.png differ diff --git a/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/aaagraphdrawio.png b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/aaagraphdrawio.png new file mode 100644 index 000000000..dd61d9a2c Binary files /dev/null and b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/aaagraphdrawio.png differ diff --git a/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/aagraphdrawio.png b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/aagraphdrawio.png new file mode 100644 index 000000000..8f04ae64f Binary files /dev/null and b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/aagraphdrawio.png differ diff --git a/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/agraphdrawio.png b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/agraphdrawio.png new file mode 100644 index 000000000..f77019281 Binary files /dev/null and b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/agraphdrawio.png differ diff --git a/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/readme.md b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/readme.md index 99fd29ed5..194cb575b 100644 --- a/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/readme.md +++ b/src/main/java/g2501_2600/s2508_add_edges_to_make_degrees_of_all_nodes_even/readme.md @@ -12,7 +12,7 @@ The degree of a node is the number of edges connected to it. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/26/agraphdrawio.png) +![](agraphdrawio.png) **Input:** n = 5, edges = [[1,2],[2,3],[3,4],[4,2],[1,4],[2,5]] @@ -22,7 +22,7 @@ The degree of a node is the number of edges connected to it. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/10/26/aagraphdrawio.png) +![](aagraphdrawio.png) **Input:** n = 4, edges = [[1,2],[3,4]] @@ -32,7 +32,7 @@ The degree of a node is the number of edges connected to it. **Example 3:** -![](https://assets.leetcode.com/uploads/2022/10/26/aaagraphdrawio.png) +![](aaagraphdrawio.png) **Input:** n = 4, edges = [[1,2],[1,3],[1,4]] diff --git a/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/aexample2.png b/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/aexample2.png new file mode 100644 index 000000000..7621b2ddf Binary files /dev/null and b/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/aexample2.png differ diff --git a/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/bexample1.png b/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/bexample1.png new file mode 100644 index 000000000..589ba21b0 Binary files /dev/null and b/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/bexample1.png differ diff --git a/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/readme.md b/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/readme.md index 858c86ec7..948facea5 100644 --- a/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/readme.md +++ b/src/main/java/g2501_2600/s2509_cycle_length_queries_in_a_tree/readme.md @@ -23,7 +23,7 @@ Return _an array_ `answer` _of length_ `m` _where_ `answer[i]` _is the answer to **Example 1:** -![](https://assets.leetcode.com/uploads/2022/10/25/bexample1.png) +![](bexample1.png) **Input:** n = 3, queries = [[5,3],[4,7],[2,3]] @@ -39,7 +39,7 @@ Return _an array_ `answer` _of length_ `m` _where_ `answer[i]` _is the answer to **Example 2:** -![](https://assets.leetcode.com/uploads/2022/10/25/aexample2.png) +![](aexample2.png) **Input:** n = 2, queries = [[1,2]] diff --git a/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/p2example11.png b/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/p2example11.png new file mode 100644 index 000000000..e16e639bf Binary files /dev/null and b/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/p2example11.png differ diff --git a/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/p2example22.png b/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/p2example22.png new file mode 100644 index 000000000..73cca17f3 Binary files /dev/null and b/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/p2example22.png differ diff --git a/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/readme.md b/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/readme.md index a38d107ac..a25961c33 100644 --- a/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/readme.md +++ b/src/main/java/g2501_2600/s2536_increment_submatrices_by_one/readme.md @@ -12,7 +12,7 @@ Return _the matrix_ `mat` _after performing every query._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/11/24/p2example11.png) +![](p2example11.png) **Input:** n = 3, queries = [[1,1,2,2],[0,0,1,1]] @@ -26,7 +26,7 @@ Return _the matrix_ `mat` _after performing every query._ **Example 2:** -![](https://assets.leetcode.com/uploads/2022/11/24/p2example22.png) +![](p2example22.png) **Input:** n = 2, queries = [[0,0,1,1]] diff --git a/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/example14.png b/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/example14.png new file mode 100644 index 000000000..dc0a4a0cb Binary files /dev/null and b/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/example14.png differ diff --git a/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/p1_example2.png b/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/p1_example2.png new file mode 100644 index 000000000..1d6746d4d Binary files /dev/null and b/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/p1_example2.png differ diff --git a/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/readme.md b/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/readme.md index 9f564fb0e..1662213fa 100644 --- a/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/readme.md +++ b/src/main/java/g2501_2600/s2538_difference_between_maximum_and_minimum_price_sum/readme.md @@ -14,7 +14,7 @@ Return _the **maximum** possible **cost**_ _amongst all possible root choices_. **Example 1:** -![](https://assets.leetcode.com/uploads/2022/12/01/example14.png) +![](example14.png) **Input:** n = 6, edges = [[0,1],[1,2],[1,3],[3,4],[3,5]], price = [9,8,7,6,10,5] @@ -30,7 +30,7 @@ The difference between the maximum and minimum price sum is 24. It can be proved **Example 2:** -![](https://assets.leetcode.com/uploads/2022/11/24/p1_example2.png) +![](p1_example2.png) **Input:** n = 3, edges = [[0,1],[1,2]], price = [1,1,1] diff --git a/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/example1.png b/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/example1.png new file mode 100644 index 000000000..9bc84c129 Binary files /dev/null and b/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/example1.png differ diff --git a/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/example2.png b/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/example2.png new file mode 100644 index 000000000..5fe52a111 Binary files /dev/null and b/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/example2.png differ diff --git a/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/readme.md b/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/readme.md index d1a1133ad..acb87e7b8 100644 --- a/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/readme.md +++ b/src/main/java/g2501_2600/s2545_sort_the_students_by_their_kth_score/readme.md @@ -10,7 +10,7 @@ Return _the matrix after sorting it._ **Example 1:** -![](https://assets.leetcode.com/uploads/2022/11/30/example1.png) +![](example1.png) **Input:** score = [[10,6,9,1],[7,5,11,2],[4,8,3,15]], k = 2 @@ -26,7 +26,7 @@ Return _the matrix after sorting it._ **Example 2:** -![](https://assets.leetcode.com/uploads/2022/11/30/example2.png) +![](example2.png) **Input:** score = [[3,4],[5,6]], k = 0 diff --git a/src/main/java/g2501_2600/s2550_count_collisions_of_monkeys_on_a_polygon/hexagon.jpg b/src/main/java/g2501_2600/s2550_count_collisions_of_monkeys_on_a_polygon/hexagon.jpg new file mode 100644 index 000000000..ef5f77afd Binary files /dev/null and b/src/main/java/g2501_2600/s2550_count_collisions_of_monkeys_on_a_polygon/hexagon.jpg differ diff --git a/src/main/java/g2501_2600/s2550_count_collisions_of_monkeys_on_a_polygon/readme.md b/src/main/java/g2501_2600/s2550_count_collisions_of_monkeys_on_a_polygon/readme.md index e8f0ea5b5..99e286cd5 100644 --- a/src/main/java/g2501_2600/s2550_count_collisions_of_monkeys_on_a_polygon/readme.md +++ b/src/main/java/g2501_2600/s2550_count_collisions_of_monkeys_on_a_polygon/readme.md @@ -4,7 +4,7 @@ Medium There is a regular convex polygon with `n` vertices. The vertices are labeled from `0` to `n - 1` in a clockwise direction, and each vertex has **exactly one monkey**. The following figure shows a convex polygon of `6` vertices. -![](https://assets.leetcode.com/uploads/2023/01/22/hexagon.jpg) +![](hexagon.jpg) Each monkey moves simultaneously to a neighboring vertex. A neighboring vertex for a vertex `i` can be: diff --git a/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/readme.md b/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/readme.md index 5abdf3b4a..cdd545f70 100644 --- a/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/readme.md +++ b/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/readme.md @@ -12,7 +12,7 @@ Return `true` _if it is possible to make the matrix disconnect or_ `false` _othe **Example 1:** -![](https://assets.leetcode.com/uploads/2022/12/07/yetgrid2drawio.png) +![](yetgrid2drawio.png) **Input:** grid = [[1,1,1],[1,0,0],[1,1,1]] @@ -24,7 +24,7 @@ We can change the cell shown in the diagram above. There is no path from (0, 0) **Example 2:** -![](https://assets.leetcode.com/uploads/2022/12/07/yetgrid3drawio.png) +![](yetgrid3drawio.png) **Input:** grid = [[1,1,1],[1,0,1],[1,1,1]] diff --git a/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/yetgrid2drawio.png b/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/yetgrid2drawio.png new file mode 100644 index 000000000..1775f5cae Binary files /dev/null and b/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/yetgrid2drawio.png differ diff --git a/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/yetgrid3drawio.png b/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/yetgrid3drawio.png new file mode 100644 index 000000000..23f2568a1 Binary files /dev/null and b/src/main/java/g2501_2600/s2556_disconnect_path_in_a_binary_matrix_by_at_most_one_flip/yetgrid3drawio.png differ diff --git a/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/readme.md b/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/readme.md index 74957209d..7172af8e3 100644 --- a/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/readme.md +++ b/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/readme.md @@ -10,7 +10,7 @@ Return _the **minimum** time required in which you can visit the bottom-right ce **Example 1:** -![](https://assets.leetcode.com/uploads/2023/02/14/yetgriddrawio-8.png) +![](yetgriddrawio-8.png) **Input:** grid = [[0,1,3,2],[5,1,2,5],[4,3,8,6]] @@ -30,7 +30,7 @@ The final time is 7. It can be shown that it is the minimum time possible. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/02/14/yetgriddrawio-9.png) +![](yetgriddrawio-9.png) **Input:** grid = [[0,2,4],[3,2,1],[1,0,4]] diff --git a/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/yetgriddrawio-8.png b/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/yetgriddrawio-8.png new file mode 100644 index 000000000..df85556dc Binary files /dev/null and b/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/yetgriddrawio-8.png differ diff --git a/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/yetgriddrawio-9.png b/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/yetgriddrawio-9.png new file mode 100644 index 000000000..598fc2ce7 Binary files /dev/null and b/src/main/java/g2501_2600/s2577_minimum_time_to_visit_a_cell_in_a_grid/yetgriddrawio-9.png differ diff --git a/src/main/java/g2501_2600/s2579_count_total_number_of_colored_cells/example-copy-2.png b/src/main/java/g2501_2600/s2579_count_total_number_of_colored_cells/example-copy-2.png new file mode 100644 index 000000000..cdcc3dbd8 Binary files /dev/null and b/src/main/java/g2501_2600/s2579_count_total_number_of_colored_cells/example-copy-2.png differ diff --git a/src/main/java/g2501_2600/s2579_count_total_number_of_colored_cells/readme.md b/src/main/java/g2501_2600/s2579_count_total_number_of_colored_cells/readme.md index d53143a61..0071a508b 100644 --- a/src/main/java/g2501_2600/s2579_count_total_number_of_colored_cells/readme.md +++ b/src/main/java/g2501_2600/s2579_count_total_number_of_colored_cells/readme.md @@ -9,7 +9,7 @@ There exists an infinitely large two-dimensional grid of uncolored unit cells. Y Below is a pictorial representation of the state of the grid after minutes 1, 2, and 3. -![](https://assets.leetcode.com/uploads/2023/01/10/example-copy-2.png) +![](example-copy-2.png) Return _the number of **colored cells** at the end of_ `n` _minutes_. diff --git a/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/ex-1.png b/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/ex-1.png new file mode 100644 index 000000000..df51476f1 Binary files /dev/null and b/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/ex-1.png differ diff --git a/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/ex-2.png b/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/ex-2.png new file mode 100644 index 000000000..ff49154d4 Binary files /dev/null and b/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/ex-2.png differ diff --git a/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/readme.md b/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/readme.md index 0f1132ed6..663b2de8b 100644 --- a/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/readme.md +++ b/src/main/java/g2501_2600/s2581_count_number_of_possible_root_nodes/readme.md @@ -17,7 +17,7 @@ Given the 2D integer arrays `edges`, `guesses` and the integer `k`, return _the **Example 1:** -![](https://assets.leetcode.com/uploads/2022/12/19/ex-1.png) +![](ex-1.png) **Input:** edges = [[0,1],[1,2],[1,3],[4,2]], guesses = [[1,3],[0,1],[1,0],[2,4]], k = 3 @@ -39,7 +39,7 @@ Considering 0, 1, or 2 as root node leads to 3 correct guesses. **Example 2:** -![](https://assets.leetcode.com/uploads/2022/12/19/ex-2.png) +![](ex-2.png) **Input:** edges = [[0,1],[1,2],[2,3],[3,4]], guesses = [[1,0],[3,4],[2,1],[3,2]], k = 1 diff --git a/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/binaryytreeedrawio-2.png b/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/binaryytreeedrawio-2.png new file mode 100644 index 000000000..034733fad Binary files /dev/null and b/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/binaryytreeedrawio-2.png differ diff --git a/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/readme.md b/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/readme.md index 07302a7ff..033be8cce 100644 --- a/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/readme.md +++ b/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/readme.md @@ -12,7 +12,7 @@ Return _the_ kth _**largest** level sum in the tree (not **Example 1:** -![](https://assets.leetcode.com/uploads/2022/12/14/binaryytreeedrawio-2.png) +![](binaryytreeedrawio-2.png) **Input:** root = [5,8,9,2,1,3,7,4,6], k = 2 @@ -28,7 +28,7 @@ Return _the_ kth _**largest** level sum in the tree (not **Example 2:** -![](https://assets.leetcode.com/uploads/2022/12/14/treedrawio-3.png) +![](treedrawio-3.png) **Input:** root = [1,2,null,3], k = 1 diff --git a/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/treedrawio-3.png b/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/treedrawio-3.png new file mode 100644 index 000000000..422d98461 Binary files /dev/null and b/src/main/java/g2501_2600/s2583_kth_largest_sum_in_a_binary_tree/treedrawio-3.png differ diff --git a/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/capture.png b/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/capture.png new file mode 100644 index 000000000..e3ca6f769 Binary files /dev/null and b/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/capture.png differ diff --git a/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/readme.md b/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/readme.md index 9b4f60236..ed7b2f78a 100644 --- a/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/readme.md +++ b/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/readme.md @@ -14,7 +14,7 @@ Two values `val1` and `val2` are coprime if `gcd(val1, val2) == 1` where `gcd(va **Example 1:** -![](https://assets.leetcode.com/uploads/2022/12/14/second.PNG) +![](second.png) **Input:** nums = [4,7,8,15,3,5] @@ -24,7 +24,7 @@ Two values `val1` and `val2` are coprime if `gcd(val1, val2) == 1` where `gcd(va **Example 2:** -![](https://assets.leetcode.com/uploads/2022/12/14/capture.PNG) +![](capture.png) **Input:** nums = [4,7,15,8,3,5] diff --git a/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/second.png b/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/second.png new file mode 100644 index 000000000..c5a993a62 Binary files /dev/null and b/src/main/java/g2501_2600/s2584_split_the_array_to_make_coprime_products/second.png differ diff --git a/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/knight.png b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/knight.png new file mode 100644 index 000000000..b3cd5dd8e Binary files /dev/null and b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/knight.png differ diff --git a/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/readme.md b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/readme.md index f3f222d3d..7dcddc495 100644 --- a/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/readme.md +++ b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/readme.md @@ -10,11 +10,11 @@ Return `true` _if_ `grid` _represents a valid configuration of the knight's move **Note** that a valid knight move consists of moving two squares vertically and one square horizontally, or two squares horizontally and one square vertically. The figure below illustrates all the possible eight moves of a knight from some cell. -![](https://assets.leetcode.com/uploads/2018/10/12/knight.png) +![](knight.png) **Example 1:** -![](https://assets.leetcode.com/uploads/2022/12/28/yetgriddrawio-5.png) +![](yetgriddrawio-5.png) **Input:** grid = [[0,11,16,5,20],[17,4,19,10,15],[12,1,8,21,6],[3,18,23,14,9],[24,13,2,7,22]] @@ -24,7 +24,7 @@ Return `true` _if_ `grid` _represents a valid configuration of the knight's move **Example 2:** -![](https://assets.leetcode.com/uploads/2022/12/28/yetgriddrawio-6.png) +![](yetgriddrawio-6.png) **Input:** grid = [[0,3,6],[5,8,1],[2,7,4]] diff --git a/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/yetgriddrawio-5.png b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/yetgriddrawio-5.png new file mode 100644 index 000000000..8e176cd05 Binary files /dev/null and b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/yetgriddrawio-5.png differ diff --git a/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/yetgriddrawio-6.png b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/yetgriddrawio-6.png new file mode 100644 index 000000000..80e077115 Binary files /dev/null and b/src/main/java/g2501_2600/s2596_check_knight_tour_configuration/yetgriddrawio-6.png differ diff --git a/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/graph-2.png b/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/graph-2.png new file mode 100644 index 000000000..abb216183 Binary files /dev/null and b/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/graph-2.png differ diff --git a/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/graph-4.png b/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/graph-4.png new file mode 100644 index 000000000..c9964a2f1 Binary files /dev/null and b/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/graph-4.png differ diff --git a/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/readme.md b/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/readme.md index e43338609..8d8c5ae00 100644 --- a/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/readme.md +++ b/src/main/java/g2601_2700/s2603_collect_coins_in_a_tree/readme.md @@ -15,7 +15,7 @@ Note that if you pass an edge several times, you need to count it into the answe **Example 1:** -![](https://assets.leetcode.com/uploads/2023/03/01/graph-2.png) +![](graph-2.png) **Input:** coins = [1,0,0,0,0,1], edges = [[0,1],[1,2],[2,3],[3,4],[4,5]] @@ -25,7 +25,7 @@ Note that if you pass an edge several times, you need to count it into the answe **Example 2:** -![](https://assets.leetcode.com/uploads/2023/03/02/graph-4.png) +![](graph-4.png) **Input:** coins = [0,0,0,1,1,0,0,1], edges = [[0,1],[0,2],[1,3],[1,4],[2,5],[5,6],[5,7]] diff --git a/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/cropped.png b/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/cropped.png new file mode 100644 index 000000000..a9dc048c9 Binary files /dev/null and b/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/cropped.png differ diff --git a/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/croppedagin.png b/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/croppedagin.png new file mode 100644 index 000000000..a84acb7bb Binary files /dev/null and b/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/croppedagin.png differ diff --git a/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/readme.md b/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/readme.md index 6a43e7300..602b908dc 100644 --- a/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/readme.md +++ b/src/main/java/g2601_2700/s2608_shortest_cycle_in_a_graph/readme.md @@ -10,7 +10,7 @@ A cycle is a path that starts and ends at the same node, and each edge in the pa **Example 1:** -![](https://assets.leetcode.com/uploads/2023/01/04/cropped.png) +![](cropped.png) **Input:** n = 7, edges = [[0,1],[1,2],[2,0],[3,4],[4,5],[5,6],[6,3]] @@ -20,7 +20,7 @@ A cycle is a path that starts and ends at the same node, and each edge in the pa **Example 2:** -![](https://assets.leetcode.com/uploads/2023/01/04/croppedagin.png) +![](croppedagin.png) **Input:** n = 4, edges = [[0,1],[0,2]] diff --git a/src/main/java/g2601_2700/s2614_prime_in_diagonal/readme.md b/src/main/java/g2601_2700/s2614_prime_in_diagonal/readme.md index 2f1ae9bb4..1f2f581d6 100644 --- a/src/main/java/g2601_2700/s2614_prime_in_diagonal/readme.md +++ b/src/main/java/g2601_2700/s2614_prime_in_diagonal/readme.md @@ -11,7 +11,7 @@ Note that: * An integer is **prime** if it is greater than `1` and has no positive integer divisors other than `1` and itself. * An integer `val` is on one of the **diagonals** of `nums` if there exists an integer `i` for which `nums[i][i] = val` or an `i` for which `nums[i][nums.length - i - 1] = val`. -![](https://assets.leetcode.com/uploads/2023/03/06/screenshot-2023-03-06-at-45648-pm.png) +![](screenshot-2023-03-06-at-45648-pm.png) In the above diagram, one diagonal is **[1,5,9]** and another diagonal is **[3,5,7]**. diff --git a/src/main/java/g2601_2700/s2614_prime_in_diagonal/screenshot-2023-03-06-at-45648-pm.png b/src/main/java/g2601_2700/s2614_prime_in_diagonal/screenshot-2023-03-06-at-45648-pm.png new file mode 100644 index 000000000..e779691a5 Binary files /dev/null and b/src/main/java/g2601_2700/s2614_prime_in_diagonal/screenshot-2023-03-06-at-45648-pm.png differ diff --git a/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex1.png b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex1.png new file mode 100644 index 000000000..b90e3eace Binary files /dev/null and b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex1.png differ diff --git a/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex2.png b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex2.png new file mode 100644 index 000000000..400772ea1 Binary files /dev/null and b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex2.png differ diff --git a/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex3.png b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex3.png new file mode 100644 index 000000000..337df485e Binary files /dev/null and b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/ex3.png differ diff --git a/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/readme.md b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/readme.md index 2c02af26c..87184bb7b 100644 --- a/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/readme.md +++ b/src/main/java/g2601_2700/s2617_minimum_number_of_visited_cells_in_a_grid/readme.md @@ -13,7 +13,7 @@ Return _the minimum number of cells you need to visit to reach the **bottom-righ **Example 1:** -![](https://assets.leetcode.com/uploads/2023/01/25/ex1.png) +![](ex1.png) **Input:** grid = [[3,4,2,1],[4,2,3,1],[2,1,0,0],[2,4,0,0]] @@ -23,7 +23,7 @@ Return _the minimum number of cells you need to visit to reach the **bottom-righ **Example 2:** -![](https://assets.leetcode.com/uploads/2023/01/25/ex2.png) +![](ex2.png) **Input:** grid = [[3,4,2,1],[4,2,1,1],[2,1,1,0],[3,4,1,0]] @@ -33,7 +33,7 @@ Return _the minimum number of cells you need to visit to reach the **bottom-righ **Example 3:** -![](https://assets.leetcode.com/uploads/2023/01/26/ex3.png) +![](ex3.png) **Input:** grid = [[2,1,0],[1,0,0]] diff --git a/src/main/java/g2601_2700/s2624_snail_traversal/readme.md b/src/main/java/g2601_2700/s2624_snail_traversal/readme.md index 25db07490..81c8ccbc3 100644 --- a/src/main/java/g2601_2700/s2624_snail_traversal/readme.md +++ b/src/main/java/g2601_2700/s2624_snail_traversal/readme.md @@ -6,7 +6,7 @@ Write code that enhances all arrays such that you can call the `snail(rowsCount, **Snail traversal order**starts at the top left cell with the first value of the current array. It then moves through the entire first column from top to bottom, followed by moving to the next column on the right and traversing it from bottom to top. This pattern continues, alternating the direction of traversal with each column, until the entire current array is covered. For example, when given the input array `[19, 10, 3, 7, 9, 8, 5, 2, 1, 17, 16, 14, 12, 18, 6, 13, 11, 20, 4, 15]` with `rowsCount = 5` and `colsCount = 4`, the desired output matrix is shown below. Note that iterating the matrix following the arrows corresponds to the order of numbers in the original array. -![Traversal Diagram](https://assets.leetcode.com/uploads/2023/04/10/screen-shot-2023-04-10-at-100006-pm.png) +![Traversal Diagram](screen-shot-2023-04-10-at-100006-pm.png) **Example 1:** diff --git a/src/main/java/g2601_2700/s2624_snail_traversal/screen-shot-2023-04-10-at-100006-pm.png b/src/main/java/g2601_2700/s2624_snail_traversal/screen-shot-2023-04-10-at-100006-pm.png new file mode 100644 index 000000000..d60279c89 Binary files /dev/null and b/src/main/java/g2601_2700/s2624_snail_traversal/screen-shot-2023-04-10-at-100006-pm.png differ diff --git a/src/main/java/g2601_2700/s2627_debounce/readme.md b/src/main/java/g2601_2700/s2627_debounce/readme.md index 06ca46af2..6fa3227ba 100644 --- a/src/main/java/g2601_2700/s2627_debounce/readme.md +++ b/src/main/java/g2601_2700/s2627_debounce/readme.md @@ -8,7 +8,7 @@ A **debounced** function is a function whose execution is delayed by `t` millise For example, let's say `t = 50ms`, and the function was called at `30ms`, `60ms`, and `100ms`. The first 2 function calls would be cancelled, and the 3rd function call would be executed at `150ms`. If instead `t = 35ms`, The 1st call would be cancelled, the 2nd would be executed at `95ms`, and the 3rd would be executed at `135ms`. -![Debounce Schematic](https://assets.leetcode.com/uploads/2023/04/08/screen-shot-2023-04-08-at-11048-pm.png) +![Debounce Schematic](screen-shot-2023-04-08-at-11048-pm.png) The above diagram shows how debounce will transform events. Each rectangle represents 100ms and the debounce time is 400ms. Each color represents a different set of inputs. diff --git a/src/main/java/g2601_2700/s2627_debounce/screen-shot-2023-04-08-at-11048-pm.png b/src/main/java/g2601_2700/s2627_debounce/screen-shot-2023-04-08-at-11048-pm.png new file mode 100644 index 000000000..621dcb769 Binary files /dev/null and b/src/main/java/g2601_2700/s2627_debounce/screen-shot-2023-04-08-at-11048-pm.png differ diff --git a/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/diagram33.png b/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/diagram33.png new file mode 100644 index 000000000..5401d3e75 Binary files /dev/null and b/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/diagram33.png differ diff --git a/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/example11.png b/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/example11.png new file mode 100644 index 000000000..135e56bd2 Binary files /dev/null and b/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/example11.png differ diff --git a/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/readme.md b/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/readme.md index eec99d17a..9972ec943 100644 --- a/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/readme.md +++ b/src/main/java/g2601_2700/s2641_cousins_in_binary_tree_ii/readme.md @@ -12,7 +12,7 @@ Return _the_ `root` _of the modified tree_. **Example 1:** -![](https://assets.leetcode.com/uploads/2023/01/11/example11.png) +![](example11.png) **Input:** root = [5,4,9,1,10,null,7] @@ -28,7 +28,7 @@ Return _the_ `root` _of the modified tree_. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/01/11/diagram33.png) +![](diagram33.png) **Input:** root = [3,1,2] diff --git a/src/main/java/g2601_2700/s2642_design_graph_with_shortest_path_calculator/graph3drawio-2.png b/src/main/java/g2601_2700/s2642_design_graph_with_shortest_path_calculator/graph3drawio-2.png new file mode 100644 index 000000000..d1ea643a5 Binary files /dev/null and b/src/main/java/g2601_2700/s2642_design_graph_with_shortest_path_calculator/graph3drawio-2.png differ diff --git a/src/main/java/g2601_2700/s2642_design_graph_with_shortest_path_calculator/readme.md b/src/main/java/g2601_2700/s2642_design_graph_with_shortest_path_calculator/readme.md index 2c4e7b696..d93d21a47 100644 --- a/src/main/java/g2601_2700/s2642_design_graph_with_shortest_path_calculator/readme.md +++ b/src/main/java/g2601_2700/s2642_design_graph_with_shortest_path_calculator/readme.md @@ -12,7 +12,7 @@ Implement the `Graph` class: **Example 1:** -![](https://assets.leetcode.com/uploads/2023/01/11/graph3drawio-2.png) +![](graph3drawio-2.png) **Input** ["Graph", "shortestPath", "shortestPath", "addEdge", "shortestPath"] [[4, [[0, 2, 5], [0, 1, 2], [1, 2, 1], [3, 0, 3]]], [3, 2], [0, 3], [[1, 3, 4]], [0, 3]] diff --git a/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/diagram2.png b/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/diagram2.png new file mode 100644 index 000000000..a879bf3f6 Binary files /dev/null and b/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/diagram2.png differ diff --git a/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/diagram3.png b/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/diagram3.png new file mode 100644 index 000000000..94e8514eb Binary files /dev/null and b/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/diagram3.png differ diff --git a/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/readme.md b/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/readme.md index afb07f0a5..cebfc2219 100644 --- a/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/readme.md +++ b/src/main/java/g2601_2700/s2646_minimize_the_total_price_of_the_trips/readme.md @@ -16,7 +16,7 @@ Return _the minimum total price sum to perform all the given trips_. **Example 1:** -![](https://assets.leetcode.com/uploads/2023/03/16/diagram2.png) +![](diagram2.png) **Input:** n = 4, edges = [[0,1],[1,2],[1,3]], price = [2,2,10,6], trips = [[0,3],[2,1],[2,3]] @@ -36,7 +36,7 @@ It can be proven, that 23 is the minimum answer that we can achieve. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/03/16/diagram3.png) +![](diagram3.png) **Input:** n = 2, edges = [[0,1]], price = [2,2], trips = [[0,0]] diff --git a/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/example.png b/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/example.png new file mode 100644 index 000000000..50c65c7d6 Binary files /dev/null and b/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/example.png differ diff --git a/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/example2.png b/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/example2.png new file mode 100644 index 000000000..cfd3de81b Binary files /dev/null and b/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/example2.png differ diff --git a/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/readme.md b/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/readme.md index 5274afa59..3d7876ee7 100644 --- a/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/readme.md +++ b/src/main/java/g2601_2700/s2658_maximum_number_of_fish_in_a_grid/readme.md @@ -18,7 +18,7 @@ An **adjacent** cell of the cell `(r, c)`, is one of the cells `(r, c + 1)`, `(r **Example 1:** -![](https://assets.leetcode.com/uploads/2023/03/29/example.png) +![](example.png) **Input:** grid = [[0,2,1,0],[4,0,0,3],[1,0,0,4],[0,3,2,0]] @@ -28,7 +28,7 @@ An **adjacent** cell of the cell `(r, c)`, is one of the cells `(r, c + 1)`, `(r **Example 2:** -![](https://assets.leetcode.com/uploads/2023/03/29/example2.png) +![](example2.png) **Input:** grid = [[1,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,1]] diff --git a/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/grid1.jpg b/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/grid1.jpg new file mode 100644 index 000000000..1606a3a45 Binary files /dev/null and b/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/grid1.jpg differ diff --git a/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/grid2.jpg b/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/grid2.jpg new file mode 100644 index 000000000..b2e43193c Binary files /dev/null and b/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/grid2.jpg differ diff --git a/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/readme.md b/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/readme.md index d103cbb92..f755d98a5 100644 --- a/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/readme.md +++ b/src/main/java/g2601_2700/s2661_first_completely_painted_row_or_column/readme.md @@ -10,7 +10,7 @@ Return _the smallest index_ `i` _at which either a row or a column will be compl **Example 1:** -![](image explanation for example 1)![image explanation for example 1](https://assets.leetcode.com/uploads/2023/01/18/grid1.jpg) +![](image explanation for example 1)![image explanation for example 1](grid1.jpg) **Input:** arr = [1,3,4,2], mat = [[1,4],[2,3]] @@ -20,7 +20,7 @@ Return _the smallest index_ `i` _at which either a row or a column will be compl **Example 2:** -![image explanation for example 2](https://assets.leetcode.com/uploads/2023/01/18/grid2.jpg) +![image explanation for example 2](grid2.jpg) **Input:** arr = [2,8,7,4,1,3,5,6,9], mat = [[3,2,5],[1,4,6],[8,7,9]] diff --git a/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/binaryytreee2drawio.png b/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/binaryytreee2drawio.png new file mode 100644 index 000000000..1a422001a Binary files /dev/null and b/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/binaryytreee2drawio.png differ diff --git a/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/binaryytreeedrawio-4.png b/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/binaryytreeedrawio-4.png new file mode 100644 index 000000000..e42a91844 Binary files /dev/null and b/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/binaryytreeedrawio-4.png differ diff --git a/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/readme.md b/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/readme.md index 49cedfa21..5534d890c 100644 --- a/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/readme.md +++ b/src/main/java/g2601_2700/s2673_make_costs_of_paths_equal_in_a_binary_tree/readme.md @@ -15,7 +15,7 @@ Return _the **minimum** number of increments you need to make the cost of paths **Example 1:** -![](https://assets.leetcode.com/uploads/2023/04/04/binaryytreeedrawio-4.png) +![](binaryytreeedrawio-4.png) **Input:** n = 7, cost = [1,5,2,2,3,3,1] @@ -33,7 +33,7 @@ It can be shown that this is the minimum answer we can achieve. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/04/04/binaryytreee2drawio.png) +![](binaryytreee2drawio.png) **Input:** n = 3, cost = [5,3,3] diff --git a/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/readme.md b/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/readme.md index 398322a90..5405b439f 100644 --- a/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/readme.md +++ b/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/readme.md @@ -12,7 +12,7 @@ Return _the **maximum** number of **moves** that you can perform._ **Example 1:** -![](https://assets.leetcode.com/uploads/2023/04/11/yetgriddrawio-10.png) +![](yetgriddrawio-10.png) **Input:** grid = [[2,4,3,5],[5,4,9,3],[3,4,2,11],[10,9,13,15]] @@ -27,7 +27,7 @@ It can be shown that it is the maximum number of moves that can be made. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/04/12/yetgrid4drawio.png) **Input:** grid = [[3,2,4],[2,1,9],[1,1,7]] +![](yetgrid4drawio.png) **Input:** grid = [[3,2,4],[2,1,9],[1,1,7]] **Output:** 0 diff --git a/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/yetgrid4drawio.png b/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/yetgrid4drawio.png new file mode 100644 index 000000000..9aa354ba8 Binary files /dev/null and b/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/yetgrid4drawio.png differ diff --git a/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/yetgriddrawio-10.png b/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/yetgriddrawio-10.png new file mode 100644 index 000000000..f5a09286c Binary files /dev/null and b/src/main/java/g2601_2700/s2684_maximum_number_of_moves_in_a_grid/yetgriddrawio-10.png differ diff --git a/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/readme.md b/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/readme.md index ba5d369ba..483807172 100644 --- a/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/readme.md +++ b/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/readme.md @@ -12,7 +12,7 @@ A connected component is said to be **complete** if there exists an edge between **Example 1:** -**![](https://assets.leetcode.com/uploads/2023/04/11/screenshot-from-2023-04-11-23-31-23.png)** +**![](screenshot-from-2023-04-11-23-31-23.png)** **Input:** n = 6, edges = [[0,1],[0,2],[1,2],[3,4]] @@ -22,7 +22,7 @@ A connected component is said to be **complete** if there exists an edge between **Example 2:** -**![](https://assets.leetcode.com/uploads/2023/04/11/screenshot-from-2023-04-11-23-32-00.png)** +**![](screenshot-from-2023-04-11-23-32-00.png)** **Input:** n = 6, edges = [[0,1],[0,2],[1,2],[3,4],[3,5]] diff --git a/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/screenshot-from-2023-04-11-23-31-23.png b/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/screenshot-from-2023-04-11-23-31-23.png new file mode 100644 index 000000000..f4ce331ab Binary files /dev/null and b/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/screenshot-from-2023-04-11-23-31-23.png differ diff --git a/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/screenshot-from-2023-04-11-23-32-00.png b/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/screenshot-from-2023-04-11-23-32-00.png new file mode 100644 index 000000000..dec702a8c Binary files /dev/null and b/src/main/java/g2601_2700/s2685_count_the_number_of_complete_components/screenshot-from-2023-04-11-23-32-00.png differ diff --git a/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph-2.png b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph-2.png new file mode 100644 index 000000000..5b7371f48 Binary files /dev/null and b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph-2.png differ diff --git a/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph-3.png b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph-3.png new file mode 100644 index 000000000..bc4f1b2ce Binary files /dev/null and b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph-3.png differ diff --git a/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph.png b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph.png new file mode 100644 index 000000000..dc6d9e0a0 Binary files /dev/null and b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/graph.png differ diff --git a/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/readme.md b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/readme.md index 53cdaa1ee..53d16b43e 100644 --- a/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/readme.md +++ b/src/main/java/g2601_2700/s2699_modify_graph_edge_weights/readme.md @@ -14,7 +14,7 @@ Return _an array containing all edges (even unmodified ones) in any order if it **Example 1:** -**![](https://assets.leetcode.com/uploads/2023/04/18/graph.png)** +**![](graph.png)** **Input:** n = 5, edges = [[4,1,-1],[2,0,-1],[0,3,-1],[4,3,-1]], source = 0, destination = 1, target = 5 @@ -24,7 +24,7 @@ Return _an array containing all edges (even unmodified ones) in any order if it **Example 2:** -**![](https://assets.leetcode.com/uploads/2023/04/18/graph-2.png)** +**![](graph-2.png)** **Input:** n = 3, edges = [[0,1,-1],[0,2,5]], source = 0, destination = 2, target = 6 @@ -34,7 +34,7 @@ Return _an array containing all edges (even unmodified ones) in any order if it **Example 3:** -**![](https://assets.leetcode.com/uploads/2023/04/19/graph-3.png)** +**![](graph-3.png)** **Input:** n = 4, edges = [[1,0,4],[1,2,3],[2,3,5],[0,3,-1]], source = 0, destination = 2, target = 6 diff --git a/src/main/java/g2701_2800/s2711_difference_of_number_of_distinct_values_on_diagonals/ex2.png b/src/main/java/g2701_2800/s2711_difference_of_number_of_distinct_values_on_diagonals/ex2.png new file mode 100644 index 000000000..ffc63ff33 Binary files /dev/null and b/src/main/java/g2701_2800/s2711_difference_of_number_of_distinct_values_on_diagonals/ex2.png differ diff --git a/src/main/java/g2701_2800/s2711_difference_of_number_of_distinct_values_on_diagonals/readme.md b/src/main/java/g2701_2800/s2711_difference_of_number_of_distinct_values_on_diagonals/readme.md index 562be7051..c0b6564d7 100644 --- a/src/main/java/g2701_2800/s2711_difference_of_number_of_distinct_values_on_diagonals/readme.md +++ b/src/main/java/g2701_2800/s2711_difference_of_number_of_distinct_values_on_diagonals/readme.md @@ -19,7 +19,7 @@ A cell (r1, c1) belongs to the top-left diago **Example 1:** -![](https://assets.leetcode.com/uploads/2023/04/19/ex2.png) +![](ex2.png) **Input:** grid = [[1,2,3],[3,1,5],[3,2,1]] diff --git a/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag1drawio.png b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag1drawio.png new file mode 100644 index 000000000..c6a6ce775 Binary files /dev/null and b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag1drawio.png differ diff --git a/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag3drawio.png b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag3drawio.png new file mode 100644 index 000000000..d5dbee0b7 Binary files /dev/null and b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag3drawio.png differ diff --git a/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag4drawio.png b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag4drawio.png new file mode 100644 index 000000000..3d85c735f Binary files /dev/null and b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/diag4drawio.png differ diff --git a/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/readme.md b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/readme.md index d4709d192..304d45332 100644 --- a/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/readme.md +++ b/src/main/java/g2701_2800/s2713_maximum_strictly_increasing_cells_in_a_matrix/readme.md @@ -12,7 +12,7 @@ Return _an integer denoting the maximum number of cells that can be visited._ **Example 1:** -**![](https://assets.leetcode.com/uploads/2023/04/23/diag1drawio.png)** +**![](diag1drawio.png)** **Input:** mat = [[3,1],[3,4]] @@ -22,7 +22,7 @@ Return _an integer denoting the maximum number of cells that can be visited._ **Example 2:** -**![](https://assets.leetcode.com/uploads/2023/04/23/diag3drawio.png)** +**![](diag3drawio.png)** **Input:** mat = [[1,1],[1,1]] @@ -32,7 +32,7 @@ Return _an integer denoting the maximum number of cells that can be visited._ **Example 3:** -**![](https://assets.leetcode.com/uploads/2023/04/23/diag4drawio.png)** +**![](diag4drawio.png)** **Input:** mat = [[3,1,6],[-9,5,7]] diff --git a/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/exm1.png b/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/exm1.png new file mode 100644 index 000000000..7227c1f2d Binary files /dev/null and b/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/exm1.png differ diff --git a/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/exm2.png b/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/exm2.png new file mode 100644 index 000000000..0a296a2dc Binary files /dev/null and b/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/exm2.png differ diff --git a/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/readme.md b/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/readme.md index a92e1f371..4c261d176 100644 --- a/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/readme.md +++ b/src/main/java/g2701_2800/s2718_sum_of_matrix_after_queries/readme.md @@ -13,7 +13,7 @@ Return _the sum of integers in the matrix after all queries are applied_. **Example 1:** -![](https://assets.leetcode.com/uploads/2023/05/11/exm1.png) +![](exm1.png) **Input:** n = 3, queries = [[0,0,1],[1,2,2],[0,2,3],[1,0,4]] @@ -23,7 +23,7 @@ Return _the sum of integers in the matrix after all queries are applied_. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/05/11/exm2.png) +![](exm2.png) **Input:** n = 3, queries = [[0,0,4],[0,1,2],[1,0,1],[0,2,3],[1,2,1]] diff --git a/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516004433-7.png b/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516004433-7.png new file mode 100644 index 000000000..49b92e535 Binary files /dev/null and b/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516004433-7.png differ diff --git a/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516005114-9.png b/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516005114-9.png new file mode 100644 index 000000000..b0ec458e0 Binary files /dev/null and b/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516005114-9.png differ diff --git a/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516011718-12.png b/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516011718-12.png new file mode 100644 index 000000000..7111feea7 Binary files /dev/null and b/src/main/java/g2701_2800/s2751_robot_collisions/image-20230516011718-12.png differ diff --git a/src/main/java/g2701_2800/s2751_robot_collisions/readme.md b/src/main/java/g2701_2800/s2751_robot_collisions/readme.md index d297f2cdd..9d7424123 100644 --- a/src/main/java/g2701_2800/s2751_robot_collisions/readme.md +++ b/src/main/java/g2701_2800/s2751_robot_collisions/readme.md @@ -18,7 +18,7 @@ Return _an array containing the health of the remaining robots (in the order the **Example 1:** -![](https://assets.leetcode.com/uploads/2023/05/15/image-20230516011718-12.png) +![](image-20230516011718-12.png) **Input:** positions = [5,4,3,2,1], healths = [2,17,9,15,10], directions = "RRRRR" @@ -28,7 +28,7 @@ Return _an array containing the health of the remaining robots (in the order the **Example 2:** -![](https://assets.leetcode.com/uploads/2023/05/15/image-20230516004433-7.png) +![](image-20230516004433-7.png) **Input:** positions = [3,5,2,6], healths = [10,10,15,12], directions = "RLRL" @@ -38,7 +38,7 @@ Return _an array containing the health of the remaining robots (in the order the **Example 3:** -![](https://assets.leetcode.com/uploads/2023/05/15/image-20230516005114-9.png) +![](image-20230516005114-9.png) **Input:** positions = [1,2,5,6], healths = [10,10,11,11], directions = "RLRL" diff --git a/src/main/java/g2701_2800/s2768_number_of_black_blocks/readme.md b/src/main/java/g2701_2800/s2768_number_of_black_blocks/readme.md index a44db470f..d58dc6cc7 100644 --- a/src/main/java/g2701_2800/s2768_number_of_black_blocks/readme.md +++ b/src/main/java/g2701_2800/s2768_number_of_black_blocks/readme.md @@ -16,7 +16,7 @@ Return _a **0-indexed** integer array_ `arr` _of size_ `5` _such that_ `arr[i]` **Output:** [3,1,0,0,0] -**Explanation:** The grid looks like this: ![](https://assets.leetcode.com/uploads/2023/06/18/screen-shot-2023-06-18-at-44656-am.png) +**Explanation:** The grid looks like this: ![](screen-shot-2023-06-18-at-44656-am.png) There is only 1 block with one black cell, and it is the block starting with cell [0,0]. @@ -30,7 +30,7 @@ Thus, we return [3,1,0,0,0]. **Output:** [0,2,2,0,0] -**Explanation:** The grid looks like this: ![](https://assets.leetcode.com/uploads/2023/06/18/screen-shot-2023-06-18-at-45018-am.png) +**Explanation:** The grid looks like this: ![](screen-shot-2023-06-18-at-45018-am.png) There are 2 blocks with two black cells (the ones starting with cell coordinates [0,0] and [0,1]). diff --git a/src/main/java/g2701_2800/s2768_number_of_black_blocks/screen-shot-2023-06-18-at-44656-am.png b/src/main/java/g2701_2800/s2768_number_of_black_blocks/screen-shot-2023-06-18-at-44656-am.png new file mode 100644 index 000000000..d1670e76c Binary files /dev/null and b/src/main/java/g2701_2800/s2768_number_of_black_blocks/screen-shot-2023-06-18-at-44656-am.png differ diff --git a/src/main/java/g2701_2800/s2768_number_of_black_blocks/screen-shot-2023-06-18-at-45018-am.png b/src/main/java/g2701_2800/s2768_number_of_black_blocks/screen-shot-2023-06-18-at-45018-am.png new file mode 100644 index 000000000..dd26ba659 Binary files /dev/null and b/src/main/java/g2701_2800/s2768_number_of_black_blocks/screen-shot-2023-06-18-at-45018-am.png differ diff --git a/src/main/java/g2701_2800/s2791_count_paths_that_can_form_a_palindrome_in_a_tree/readme.md b/src/main/java/g2701_2800/s2791_count_paths_that_can_form_a_palindrome_in_a_tree/readme.md index 9413b81e0..14638ff46 100644 --- a/src/main/java/g2701_2800/s2791_count_paths_that_can_form_a_palindrome_in_a_tree/readme.md +++ b/src/main/java/g2701_2800/s2791_count_paths_that_can_form_a_palindrome_in_a_tree/readme.md @@ -12,7 +12,7 @@ A string is a **palindrome** when it reads the same backwards as forwards. **Example 1:** -![](https://assets.leetcode.com/uploads/2023/07/15/treedrawio-8drawio.png) +![](treedrawio-8drawio.png) **Input:** parent = [-1,0,0,1,1,2], s = "acaabc" diff --git a/src/main/java/g2701_2800/s2791_count_paths_that_can_form_a_palindrome_in_a_tree/treedrawio-8drawio.png b/src/main/java/g2701_2800/s2791_count_paths_that_can_form_a_palindrome_in_a_tree/treedrawio-8drawio.png new file mode 100644 index 000000000..e4cfe3832 Binary files /dev/null and b/src/main/java/g2701_2800/s2791_count_paths_that_can_form_a_palindrome_in_a_tree/treedrawio-8drawio.png differ diff --git a/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/ex1_copy.png b/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/ex1_copy.png new file mode 100644 index 000000000..3018e7d0d Binary files /dev/null and b/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/ex1_copy.png differ diff --git a/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/ex2_copy1.png b/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/ex2_copy1.png new file mode 100644 index 000000000..cf0fd1b5c Binary files /dev/null and b/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/ex2_copy1.png differ diff --git a/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/readme.md b/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/readme.md index 2619f9a51..9d0732861 100644 --- a/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/readme.md +++ b/src/main/java/g2801_2900/s2807_insert_greatest_common_divisors_in_linked_list/readme.md @@ -12,7 +12,7 @@ The **greatest common divisor** of two numbers is the largest positive integer t **Example 1:** -![](https://assets.leetcode.com/uploads/2023/07/18/ex1_copy.png) +![](ex1_copy.png) **Input:** head = [18,6,10,3] @@ -28,7 +28,7 @@ There are no more adjacent nodes, so we return the linked list. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/07/18/ex2_copy1.png) +![](ex2_copy1.png) **Input:** head = [7] diff --git a/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example1.png b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example1.png new file mode 100644 index 000000000..cbb6d1a57 Binary files /dev/null and b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example1.png differ diff --git a/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example2.png b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example2.png new file mode 100644 index 000000000..ca05abc79 Binary files /dev/null and b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example2.png differ diff --git a/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example3.png b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example3.png new file mode 100644 index 000000000..3e2f1b96f Binary files /dev/null and b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/example3.png differ diff --git a/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/readme.md b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/readme.md index 9b564c7fa..a4152b247 100644 --- a/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/readme.md +++ b/src/main/java/g2801_2900/s2812_find_the_safest_path_in_a_grid/readme.md @@ -19,7 +19,7 @@ The **Manhattan distance** between two cells `(a, b)` and `(x, y)` is equal to ` **Example 1:** -![](https://assets.leetcode.com/uploads/2023/07/02/example1.png) +![](example1.png) **Input:** grid = [[1,0,0],[0,0,0],[0,0,1]] @@ -29,7 +29,7 @@ The **Manhattan distance** between two cells `(a, b)` and `(x, y)` is equal to ` **Example 2:** -![](https://assets.leetcode.com/uploads/2023/07/02/example2.png) +![](example2.png) **Input:** grid = [[0,0,1],[0,0,0],[0,0,0]] @@ -47,7 +47,7 @@ It can be shown that there are no other paths with a higher safeness factor. **Example 3:** -![](https://assets.leetcode.com/uploads/2023/07/02/example3.png) +![](example3.png) **Input:** grid = [[0,0,0,1],[0,0,0,0],[0,0,0,0],[1,0,0,0]] diff --git a/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/example.png b/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/example.png new file mode 100644 index 000000000..1d7ddca4a Binary files /dev/null and b/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/example.png differ diff --git a/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/example2.png b/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/example2.png new file mode 100644 index 000000000..b2871d5ba Binary files /dev/null and b/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/example2.png differ diff --git a/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/readme.md b/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/readme.md index 2008a5378..33411e71c 100644 --- a/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/readme.md +++ b/src/main/java/g2801_2900/s2816_double_a_number_represented_as_a_linked_list/readme.md @@ -8,7 +8,7 @@ Return _the_ `head` _of the linked list after **doubling** it_. **Example 1:** -![](https://assets.leetcode.com/uploads/2023/05/28/example.png) +![](example.png) **Input:** head = [1,8,9] @@ -18,7 +18,7 @@ Return _the_ `head` _of the linked list after **doubling** it_. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/05/28/example2.png) +![](example2.png) **Input:** head = [9,9,9] diff --git a/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/graph-6-1.png b/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/graph-6-1.png new file mode 100644 index 000000000..b7b30145b Binary files /dev/null and b/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/graph-6-1.png differ diff --git a/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/graph-9-1.png b/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/graph-9-1.png new file mode 100644 index 000000000..336bd84d5 Binary files /dev/null and b/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/graph-9-1.png differ diff --git a/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/readme.md b/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/readme.md index ddc376ef0..34f24147d 100644 --- a/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/readme.md +++ b/src/main/java/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/readme.md @@ -15,7 +15,7 @@ Return _an array_ `answer` _of length_ `m` _where_ `answer[i]` _is the answer to **Example 1:** -![](https://assets.leetcode.com/uploads/2023/08/11/graph-6-1.png) +![](graph-6-1.png) **Input:** n = 7, edges = [[0,1,1],[1,2,1],[2,3,1],[3,4,2],[4,5,2],[5,6,2]], queries = [[0,3],[3,6],[2,6],[0,6]] @@ -29,7 +29,7 @@ In the fourth query, we change the weights of edges [0,1], [1,2] and [2,3] to 2. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/08/11/graph-9-1.png) +![](graph-9-1.png) **Input:** n = 8, edges = [[1,2,6],[1,3,4],[2,4,6],[2,5,3],[3,6,6],[3,0,8],[7,0,2]], queries = [[4,6],[0,4],[6,5],[7,4]] diff --git a/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/example1.svg b/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/example1.svg new file mode 100644 index 000000000..ea6a6a952 --- /dev/null +++ b/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/example1.svg @@ -0,0 +1,4 @@ + + + +
Start
Start
Finish
Finish
Text is not SVG - cannot display
\ No newline at end of file diff --git a/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/example2.svg b/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/example2.svg new file mode 100644 index 000000000..3f120b024 --- /dev/null +++ b/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/example2.svg @@ -0,0 +1,4 @@ + + + +
Start
Start
Finish
Finish
Text is not SVG - cannot display
\ No newline at end of file diff --git a/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/readme.md b/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/readme.md index 767d479fd..e5e685ce4 100644 --- a/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/readme.md +++ b/src/main/java/g2801_2900/s2849_determine_if_a_cell_is_reachable_at_a_given_time/readme.md @@ -12,7 +12,7 @@ A cell's **adjacent cells** are the 8 cells around it that share at least one co **Example 1:** -![](https://assets.leetcode.com/uploads/2023/08/05/example2.svg) +![](example2.svg) **Input:** sx = 2, sy = 4, fx = 7, fy = 7, t = 6 @@ -22,7 +22,7 @@ A cell's **adjacent cells** are the 8 cells around it that share at least one co **Example 2:** -![](https://assets.leetcode.com/uploads/2023/08/05/example1.svg) +![](example1.svg) **Input:** sx = 3, sy = 1, fx = 7, fy = 3, t = 3 diff --git a/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/example1-3.svg b/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/example1-3.svg new file mode 100644 index 000000000..5dc4abe5b --- /dev/null +++ b/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/example1-3.svg @@ -0,0 +1,4 @@ + + + +
1
1
1
1
0
0
1
1
1
1
1
1
1
1
2
2
1
1
Text is not SVG - cannot display
\ No newline at end of file diff --git a/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/example2-2.svg b/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/example2-2.svg new file mode 100644 index 000000000..68c37ca86 --- /dev/null +++ b/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/example2-2.svg @@ -0,0 +1,4 @@ + + + +
1
1
3
3
0
0
1
1
0
0
0
0
1
1
0
0
3
3
Text is not SVG - cannot display
\ No newline at end of file diff --git a/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/readme.md b/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/readme.md index 104b1ea86..d7099eadd 100644 --- a/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/readme.md +++ b/src/main/java/g2801_2900/s2850_minimum_moves_to_spread_stones_over_grid/readme.md @@ -10,7 +10,7 @@ Return _the **minimum number of moves** required to place one stone in each cell **Example 1:** -![](https://assets.leetcode.com/uploads/2023/08/23/example1-3.svg) +![](example1-3.svg) **Input:** grid = [[1,1,0],[1,1,1],[1,2,1]] @@ -30,7 +30,7 @@ It can be shown that 3 is the minimum number of moves required to place one ston **Example 2:** -![](https://assets.leetcode.com/uploads/2023/08/23/example2-2.svg) +![](example2-2.svg) **Input:** grid = [[1,3,0],[1,0,0],[1,0,3]] diff --git a/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/image-20230826221104-3.png b/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/image-20230826221104-3.png new file mode 100644 index 000000000..ad91bddf1 Binary files /dev/null and b/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/image-20230826221104-3.png differ diff --git a/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/image-20230826225541-2.png b/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/image-20230826225541-2.png new file mode 100644 index 000000000..2251e9142 Binary files /dev/null and b/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/image-20230826225541-2.png differ diff --git a/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/readme.md b/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/readme.md index 0206bacd2..ff34e8905 100644 --- a/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/readme.md +++ b/src/main/java/g2801_2900/s2858_minimum_edge_reversals_so_every_node_is_reachable/readme.md @@ -14,7 +14,7 @@ Return _an integer array_ `answer`_, where_ `answer[i]` _is the_ _**minimum** nu **Example 1:** -![](https://assets.leetcode.com/uploads/2023/08/26/image-20230826221104-3.png) +![](image-20230826221104-3.png) **Input:** n = 4, edges = [[2,0],[2,1],[1,3]] @@ -40,7 +40,7 @@ So, answer[3] = 2. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/08/26/image-20230826225541-2.png) +![](image-20230826225541-2.png) **Input:** n = 3, edges = [[1,2],[2,0]] diff --git a/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/example1.png b/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/example1.png new file mode 100644 index 000000000..3a7b8fbd5 Binary files /dev/null and b/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/example1.png differ diff --git a/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/example2.png b/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/example2.png new file mode 100644 index 000000000..a1481fbaa Binary files /dev/null and b/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/example2.png differ diff --git a/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/readme.md b/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/readme.md index 3d0e37aaf..96e46bd64 100644 --- a/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/readme.md +++ b/src/main/java/g2801_2900/s2867_count_valid_paths_in_a_tree/readme.md @@ -15,7 +15,7 @@ A path `(a, b)` is **valid** if there exists **exactly one** prime number among **Example 1:** -![](https://assets.leetcode.com/uploads/2023/08/27/example1.png) +![](example1.png) **Input:** n = 5, edges = [[1,2],[1,3],[2,4],[2,5]] @@ -31,7 +31,7 @@ It can be shown that there are only 4 valid paths. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/08/27/example2.png) +![](example2.png) **Input:** n = 6, edges = [[1,2],[1,3],[2,4],[3,5],[3,6]] diff --git a/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/example12-cropped2svg.jpg b/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/example12-cropped2svg.jpg new file mode 100644 index 000000000..eec9789bd Binary files /dev/null and b/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/example12-cropped2svg.jpg differ diff --git a/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/example21svg-1.jpg b/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/example21svg-1.jpg new file mode 100644 index 000000000..785149ce8 Binary files /dev/null and b/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/example21svg-1.jpg differ diff --git a/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/readme.md b/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/readme.md index f7a523dd3..15be432f0 100644 --- a/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/readme.md +++ b/src/main/java/g2801_2900/s2872_maximum_number_of_k_divisible_components/readme.md @@ -12,7 +12,7 @@ Return _the **maximum number of components** in any valid split_. **Example 1:** -![](https://assets.leetcode.com/uploads/2023/08/07/example12-cropped2svg.jpg) +![](example12-cropped2svg.jpg) **Input:** n = 5, edges = [[0,2],[1,2],[1,3],[2,4]], values = [1,8,1,4,4], k = 6 @@ -26,7 +26,7 @@ It can be shown that no other valid split has more than 2 connected components. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/08/07/example21svg-1.jpg) +![](example21svg-1.jpg) **Input:** n = 7, edges = [[0,1],[0,2],[1,3],[1,4],[2,5],[2,6]], values = [3,0,6,1,5,2,1], k = 3 diff --git a/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/graaph2drawio.png b/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/graaph2drawio.png new file mode 100644 index 000000000..e6c775013 Binary files /dev/null and b/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/graaph2drawio.png differ diff --git a/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/graaphdrawio-1.png b/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/graaphdrawio-1.png new file mode 100644 index 000000000..ff28a9e3b Binary files /dev/null and b/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/graaphdrawio-1.png differ diff --git a/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/readme.md b/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/readme.md index 0b5efdf43..a35fd5ecc 100644 --- a/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/readme.md +++ b/src/main/java/g2801_2900/s2876_count_visited_nodes_in_a_directed_graph/readme.md @@ -14,7 +14,7 @@ Return _an array_ `answer` _where_ `answer[i]` _is the number of **different** n **Example 1:** -![](https://assets.leetcode.com/uploads/2023/08/31/graaphdrawio-1.png) +![](graaphdrawio-1.png) **Input:** edges = [1,2,0,0] @@ -28,7 +28,7 @@ Return _an array_ `answer` _where_ `answer[i]` _is the number of **different** n **Example 2:** -![](https://assets.leetcode.com/uploads/2023/08/31/graaph2drawio.png) +![](graaph2drawio.png) **Input:** edges = [1,2,3,4,0] diff --git a/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/ex1-copy.png b/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/ex1-copy.png new file mode 100644 index 000000000..175d8b6a6 Binary files /dev/null and b/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/ex1-copy.png differ diff --git a/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/ex2.png b/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/ex2.png new file mode 100644 index 000000000..8df50f399 Binary files /dev/null and b/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/ex2.png differ diff --git a/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/readme.md b/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/readme.md index f56277daf..2bfde7e69 100644 --- a/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/readme.md +++ b/src/main/java/g2901_3000/s2920_maximum_points_after_collecting_coins_from_all_nodes/readme.md @@ -15,7 +15,7 @@ Return _the **maximum points** you can get after collecting the coins from **all **Example 1:** -![](https://assets.leetcode.com/uploads/2023/09/18/ex1-copy.png) +![](ex1-copy.png) **Input:** edges = [[0,1],[1,2],[2,3]], coins = [10,10,3,3], k = 5 @@ -35,7 +35,7 @@ It can be shown that the maximum points we can get after collecting coins from a **Example 2:** -**![](https://assets.leetcode.com/uploads/2023/09/18/ex2.png)** +**![](ex2.png)** **Input:** edges = [[0,1],[0,2]], coins = [8,4,4], k = 0 diff --git a/src/main/java/g2901_3000/s2924_find_champion_ii/graph-3.png b/src/main/java/g2901_3000/s2924_find_champion_ii/graph-3.png new file mode 100644 index 000000000..f474a6491 Binary files /dev/null and b/src/main/java/g2901_3000/s2924_find_champion_ii/graph-3.png differ diff --git a/src/main/java/g2901_3000/s2924_find_champion_ii/graph-4.png b/src/main/java/g2901_3000/s2924_find_champion_ii/graph-4.png new file mode 100644 index 000000000..9efdcd573 Binary files /dev/null and b/src/main/java/g2901_3000/s2924_find_champion_ii/graph-4.png differ diff --git a/src/main/java/g2901_3000/s2924_find_champion_ii/readme.md b/src/main/java/g2901_3000/s2924_find_champion_ii/readme.md index 54aec4c67..b7a3aec28 100644 --- a/src/main/java/g2901_3000/s2924_find_champion_ii/readme.md +++ b/src/main/java/g2901_3000/s2924_find_champion_ii/readme.md @@ -19,7 +19,7 @@ Return _the team that will be the **champion** of the tournament if there is a * **Example 1:** -![](https://assets.leetcode.com/uploads/2023/10/19/graph-3.png) +![](graph-3.png) **Input:** n = 3, edges = [[0,1],[1,2]] @@ -29,7 +29,7 @@ Return _the team that will be the **champion** of the tournament if there is a * **Example 2:** -![](https://assets.leetcode.com/uploads/2023/10/19/graph-4.png) +![](graph-4.png) **Input:** n = 4, edges = [[0,2],[1,3],[1,2]] diff --git a/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/graph-13-1.png b/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/graph-13-1.png new file mode 100644 index 000000000..73f9baf7d Binary files /dev/null and b/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/graph-13-1.png differ diff --git a/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/graph-14-2.png b/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/graph-14-2.png new file mode 100644 index 000000000..2bd958e8a Binary files /dev/null and b/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/graph-14-2.png differ diff --git a/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/readme.md b/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/readme.md index 7233a7ee5..6bd548a65 100644 --- a/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/readme.md +++ b/src/main/java/g2901_3000/s2925_maximum_score_after_applying_operations_on_a_tree/readme.md @@ -18,7 +18,7 @@ Return _the **maximum score** you can obtain after performing these operations o **Example 1:** -![](https://assets.leetcode.com/uploads/2023/10/11/graph-13-1.png) +![](graph-13-1.png) **Input:** edges = [[0,1],[0,2],[0,3],[2,4],[4,5]], values = [5,2,5,2,1,1] @@ -28,7 +28,7 @@ Return _the **maximum score** you can obtain after performing these operations o **Example 2:** -![](https://assets.leetcode.com/uploads/2023/10/11/graph-14-2.png) +![](graph-14-2.png) **Input:** edges = [[0,1],[0,2],[1,3],[1,4],[2,5],[2,6]], values = [20,10,9,7,4,3,5] diff --git a/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/readme.md b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/readme.md index 5159a3fa9..ec806b42d 100644 --- a/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/readme.md +++ b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/readme.md @@ -22,7 +22,7 @@ Return _an integer denoting the **maximum** area of a **square-shaped** hole in **Example 1:** -![](https://assets.leetcode.com/uploads/2023/11/05/screenshot-from-2023-11-05-22-40-25.png) +![](screenshot-from-2023-11-05-22-40-25.png) **Input:** n = 2, m = 1, hBars = [2,3], vBars = [2] @@ -46,7 +46,7 @@ Hence, the answer is 4. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/11/04/screenshot-from-2023-11-04-17-01-02.png) +![](screenshot-from-2023-11-04-17-01-02.png) **Input:** n = 1, m = 1, hBars = [2], vBars = [2] @@ -68,7 +68,7 @@ Hence, the answer is 4, and it is the maximum possible. **Example 3:** -![](https://assets.leetcode.com/uploads/2023/11/05/screenshot-from-2023-11-05-22-33-35.png) +![](screenshot-from-2023-11-05-22-33-35.png) **Input:** n = 2, m = 3, hBars = [2,3], vBars = [2,3,4] diff --git a/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-04-17-01-02.png b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-04-17-01-02.png new file mode 100644 index 000000000..1e9afeac9 Binary files /dev/null and b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-04-17-01-02.png differ diff --git a/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-05-22-33-35.png b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-05-22-33-35.png new file mode 100644 index 000000000..0326aa17e Binary files /dev/null and b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-05-22-33-35.png differ diff --git a/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-05-22-40-25.png b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-05-22-40-25.png new file mode 100644 index 000000000..c9fcb790c Binary files /dev/null and b/src/main/java/g2901_3000/s2943_maximize_area_of_square_hole_in_grid/screenshot-from-2023-11-05-22-40-25.png differ diff --git a/src/main/java/g2901_3000/s2946_matrix_similarity_after_cyclic_shifts/readme.md b/src/main/java/g2901_3000/s2946_matrix_similarity_after_cyclic_shifts/readme.md index 7f2884dc3..5070b4308 100644 --- a/src/main/java/g2901_3000/s2946_matrix_similarity_after_cyclic_shifts/readme.md +++ b/src/main/java/g2901_3000/s2946_matrix_similarity_after_cyclic_shifts/readme.md @@ -12,7 +12,7 @@ Return `true` _if the initial and final matrix are exactly the same and_ `false` **Output:** true -**Explanation:** ![](https://assets.leetcode.com/uploads/2023/10/29/similarmatrix.png) Initially, the matrix looks like the first figure. Second figure represents the state of the matrix after one right and left cyclic shifts to even and odd indexed rows. Third figure is the final state of the matrix after two cyclic shifts which is similar to the initial matrix. Therefore, return true. +**Explanation:** ![](similarmatrix.png) Initially, the matrix looks like the first figure. Second figure represents the state of the matrix after one right and left cyclic shifts to even and odd indexed rows. Third figure is the final state of the matrix after two cyclic shifts which is similar to the initial matrix. Therefore, return true. **Example 2:** diff --git a/src/main/java/g2901_3000/s2946_matrix_similarity_after_cyclic_shifts/similarmatrix.png b/src/main/java/g2901_3000/s2946_matrix_similarity_after_cyclic_shifts/similarmatrix.png new file mode 100644 index 000000000..fac6c826c Binary files /dev/null and b/src/main/java/g2901_3000/s2946_matrix_similarity_after_cyclic_shifts/similarmatrix.png differ diff --git a/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/example11.png b/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/example11.png new file mode 100644 index 000000000..b092ffd0b Binary files /dev/null and b/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/example11.png differ diff --git a/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/example22.png b/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/example22.png new file mode 100644 index 000000000..56b46c6f5 Binary files /dev/null and b/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/example22.png differ diff --git a/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/readme.md b/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/readme.md index 766505480..67744efe4 100644 --- a/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/readme.md +++ b/src/main/java/g2901_3000/s2959_number_of_possible_sets_of_closing_branches/readme.md @@ -18,7 +18,7 @@ Return _the number of possible sets of closing branches, so that any branch has **Example 1:** -![](https://assets.leetcode.com/uploads/2023/11/08/example11.png) +![](example11.png) **Input:** n = 3, maxDistance = 5, roads = [[0,1,2],[1,2,10],[0,2,10]] @@ -35,7 +35,7 @@ It can be proven, that there are only 5 possible sets of closing branches. **Example 2:** -![](https://assets.leetcode.com/uploads/2023/11/08/example22.png) +![](example22.png) **Input:** n = 3, maxDistance = 5, roads = [[0,1,20],[0,1,10],[1,2,2],[0,2,2]] diff --git a/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/readme.md b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/readme.md index 383039b26..d7244d9ef 100644 --- a/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/readme.md +++ b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/readme.md @@ -15,7 +15,7 @@ Return _an array_ `coin` _of size_ `n` _such that_ `coin[i]` _is the number of c **Example 1:** -![](https://assets.leetcode.com/uploads/2023/11/09/screenshot-2023-11-10-012641.png) +![](screenshot-2023-11-10-012641.png) **Input:** edges = [[0,1],[0,2],[0,3],[0,4],[0,5]], cost = [1,2,3,4,5,6] @@ -25,7 +25,7 @@ Return _an array_ `coin` _of size_ `n` _such that_ `coin[i]` _is the number of c **Example 2:** -![](https://assets.leetcode.com/uploads/2023/11/09/screenshot-2023-11-10-012614.png) +![](screenshot-2023-11-10-012614.png) **Input:** edges = [[0,1],[0,2],[1,3],[1,4],[1,5],[2,6],[2,7],[2,8]], cost = [1,4,2,3,5,7,8,-4,2] @@ -35,7 +35,7 @@ Return _an array_ `coin` _of size_ `n` _such that_ `coin[i]` _is the number of c **Example 3:** -![](https://assets.leetcode.com/uploads/2023/11/09/screenshot-2023-11-10-012513.png) +![](screenshot-2023-11-10-012513.png) **Input:** edges = [[0,1],[0,2]], cost = [1,2,-2] diff --git a/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012513.png b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012513.png new file mode 100644 index 000000000..e56db2f06 Binary files /dev/null and b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012513.png differ diff --git a/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012614.png b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012614.png new file mode 100644 index 000000000..73e1ea1a0 Binary files /dev/null and b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012614.png differ diff --git a/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012641.png b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012641.png new file mode 100644 index 000000000..4caff07b2 Binary files /dev/null and b/src/main/java/g2901_3000/s2973_find_number_of_coins_to_place_in_tree_nodes/screenshot-2023-11-10-012641.png differ diff --git a/src/main/java/g2901_3000/s2975_maximum_square_area_by_removing_fences_from_a_field/maxsquareareaexample1.png b/src/main/java/g2901_3000/s2975_maximum_square_area_by_removing_fences_from_a_field/maxsquareareaexample1.png new file mode 100644 index 000000000..783593168 Binary files /dev/null and b/src/main/java/g2901_3000/s2975_maximum_square_area_by_removing_fences_from_a_field/maxsquareareaexample1.png differ diff --git a/src/main/java/g2901_3000/s2975_maximum_square_area_by_removing_fences_from_a_field/readme.md b/src/main/java/g2901_3000/s2975_maximum_square_area_by_removing_fences_from_a_field/readme.md index afa8aa2af..d0a235bdd 100644 --- a/src/main/java/g2901_3000/s2975_maximum_square_area_by_removing_fences_from_a_field/readme.md +++ b/src/main/java/g2901_3000/s2975_maximum_square_area_by_removing_fences_from_a_field/readme.md @@ -14,7 +14,7 @@ Since the answer may be large, return it **modulo** 109 + 7109 + 71` (weight 7), `1->2` (weight 1), `2->1` (weight 1), `1->3` (weight 7). @@ -36,7 +36,7 @@ In the second query, there is no walk between nodes 3 and 4, so the answer is -1 **Explanation:** -![](https://assets.leetcode.com/uploads/2024/01/31/q4_example2e.png) +![](q4_example2e.png) To achieve the cost of 0 in the first query, we need to move on the following edges: `1->2` (weight 1), `2->1` (weight 6), `1->2` (weight 1). diff --git a/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/readme.md b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/readme.md index 3c48afd3b..4132e621c 100644 --- a/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/readme.md +++ b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/readme.md @@ -14,7 +14,7 @@ Return an integer denoting the **minimum** number of rectangles needed so that e **Example 1:** -![](https://assets.leetcode.com/uploads/2024/03/04/screenshot-from-2024-03-04-20-33-05.png) +![](screenshot-from-2024-03-04-20-33-05.png) **Input:** points = [[2,1],[1,0],[1,4],[1,8],[3,5],[4,6]], w = 1 @@ -29,7 +29,7 @@ The image above shows one possible placement of rectangles to cover the points: **Example 2:** -![](https://assets.leetcode.com/uploads/2024/03/04/screenshot-from-2024-03-04-18-59-12.png) +![](screenshot-from-2024-03-04-18-59-12.png) **Input:** points = [[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]], w = 2 @@ -45,7 +45,7 @@ The image above shows one possible placement of rectangles to cover the points: **Example 3:** -![](https://assets.leetcode.com/uploads/2024/03/04/screenshot-from-2024-03-04-20-24-03.png) +![](screenshot-from-2024-03-04-20-24-03.png) **Input:** points = [[2,3],[1,2]], w = 0 diff --git a/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-18-59-12.png b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-18-59-12.png new file mode 100644 index 000000000..7e828875a Binary files /dev/null and b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-18-59-12.png differ diff --git a/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-20-24-03.png b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-20-24-03.png new file mode 100644 index 000000000..dade090c2 Binary files /dev/null and b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-20-24-03.png differ diff --git a/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-20-33-05.png b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-20-33-05.png new file mode 100644 index 000000000..28eaa2ec8 Binary files /dev/null and b/src/main/java/g3101_3200/s3111_minimum_rectangles_to_cover_points/screenshot-from-2024-03-04-20-33-05.png differ diff --git a/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/example1.png b/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/example1.png new file mode 100644 index 000000000..85f8e4282 Binary files /dev/null and b/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/example1.png differ diff --git a/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/example2.png b/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/example2.png new file mode 100644 index 000000000..783b9466b Binary files /dev/null and b/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/example2.png differ diff --git a/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/readme.md b/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/readme.md index 7f330dc2e..134220597 100644 --- a/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/readme.md +++ b/src/main/java/g3101_3200/s3112_minimum_time_to_visit_disappearing_nodes/readme.md @@ -12,7 +12,7 @@ Return the array `answer`, with `answer[i]` denoting the **minimum** units of ti **Example 1:** -![](https://assets.leetcode.com/uploads/2024/03/09/example1.png) +![](example1.png) **Input:** n = 3, edges = [[0,1,2],[1,2,1],[0,2,4]], disappear = [1,1,5] @@ -28,7 +28,7 @@ We are starting our journey from node 0, and our goal is to find the minimum tim **Example 2:** -![](https://assets.leetcode.com/uploads/2024/03/09/example2.png) +![](example2.png) **Input:** n = 3, edges = [[0,1,2],[1,2,1],[0,2,4]], disappear = [1,3,5] diff --git a/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/changed.png b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/changed.png new file mode 100644 index 000000000..d1433474a Binary files /dev/null and b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/changed.png differ diff --git a/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/example21.png b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/example21.png new file mode 100644 index 000000000..e093bafb3 Binary files /dev/null and b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/example21.png differ diff --git a/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/examplechanged.png b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/examplechanged.png new file mode 100644 index 000000000..b2a88d234 Binary files /dev/null and b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/examplechanged.png differ diff --git a/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/readme.md b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/readme.md index 1bc037bce..ec1b328a2 100644 --- a/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/readme.md +++ b/src/main/java/g3101_3200/s3122_minimum_number_of_operations_to_satisfy_conditions/readme.md @@ -17,7 +17,7 @@ Return the **minimum** number of operations needed. **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/04/15/examplechanged.png)** +**![](examplechanged.png)** All the cells in the matrix already satisfy the properties. @@ -29,7 +29,7 @@ All the cells in the matrix already satisfy the properties. **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/03/27/example21.png)** +**![](example21.png)** The matrix becomes `[[1,0,1],[1,0,1]]` which satisfies the properties, by doing these 3 operations: @@ -45,7 +45,7 @@ The matrix becomes `[[1,0,1],[1,0,1]]` which satisfies the properties, by doing **Explanation:** -![](https://assets.leetcode.com/uploads/2024/03/31/changed.png) +![](changed.png) There is a single column. We can change the value to 1 in each cell using 2 operations. diff --git a/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/graph35drawio-1.png b/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/graph35drawio-1.png new file mode 100644 index 000000000..613ee10d2 Binary files /dev/null and b/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/graph35drawio-1.png differ diff --git a/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/graphhhh.png b/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/graphhhh.png new file mode 100644 index 000000000..30a5c0e0e Binary files /dev/null and b/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/graphhhh.png differ diff --git a/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/readme.md b/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/readme.md index 012584c1c..ff662732b 100644 --- a/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/readme.md +++ b/src/main/java/g3101_3200/s3123_find_edges_in_shortest_paths/readme.md @@ -12,7 +12,7 @@ Return the array `answer`. **Example 1:** -![](https://assets.leetcode.com/uploads/2024/03/05/graph35drawio-1.png) +![](graph35drawio-1.png) **Input:** n = 6, edges = [[0,1,4],[0,2,1],[1,3,2],[1,4,3],[1,5,1],[2,3,1],[3,5,3],[4,5,2]] @@ -28,7 +28,7 @@ The following are **all** the shortest paths between nodes 0 and 5: **Example 2:** -![](https://assets.leetcode.com/uploads/2024/03/05/graphhhh.png) +![](graphhhh.png) **Input:** n = 4, edges = [[2,0,1],[0,1,1],[0,3,4],[3,2,2]] diff --git a/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/changed.png b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/changed.png new file mode 100644 index 000000000..d1433474a Binary files /dev/null and b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/changed.png differ diff --git a/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/example21.png b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/example21.png new file mode 100644 index 000000000..e093bafb3 Binary files /dev/null and b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/example21.png differ diff --git a/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/examplechanged.png b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/examplechanged.png new file mode 100644 index 000000000..b2a88d234 Binary files /dev/null and b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/examplechanged.png differ diff --git a/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/readme.md b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/readme.md index cafc24506..5e8fe7d46 100644 --- a/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/readme.md +++ b/src/main/java/g3101_3200/s3142_check_if_grid_satisfies_conditions/readme.md @@ -17,7 +17,7 @@ Return `true` if **all** the cells satisfy these conditions, otherwise, return ` **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/04/15/examplechanged.png)** +**![](examplechanged.png)** All the cells in the grid satisfy the conditions. @@ -29,7 +29,7 @@ All the cells in the grid satisfy the conditions. **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/03/27/example21.png)** +**![](example21.png)** All cells in the first row are equal. @@ -41,7 +41,7 @@ All cells in the first row are equal. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/03/31/changed.png) +![](changed.png) Cells in the first column have different values. diff --git a/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/3708-tc1.png b/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/3708-tc1.png new file mode 100644 index 000000000..847b7457b Binary files /dev/null and b/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/3708-tc1.png differ diff --git a/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/3708-tc2.png b/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/3708-tc2.png new file mode 100644 index 000000000..54e24fd15 Binary files /dev/null and b/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/3708-tc2.png differ diff --git a/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/readme.md b/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/readme.md index 621f127dd..6e03718cc 100644 --- a/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/readme.md +++ b/src/main/java/g3101_3200/s3143_maximum_points_inside_the_square/readme.md @@ -15,7 +15,7 @@ Note: **Example 1:** -![](https://assets.leetcode.com/uploads/2024/03/29/3708-tc1.png) +![](3708-tc1.png) **Input:** points = [[2,2],[-1,-2],[-4,4],[-3,1],[3,-3]], s = "abdca" @@ -27,7 +27,7 @@ The square of side length 4 covers two points `points[0]` and `points[1]`. **Example 2:** -![](https://assets.leetcode.com/uploads/2024/03/29/3708-tc2.png) +![](3708-tc2.png) **Input:** points = [[1,1],[-2,-2],[-2,2]], s = "abb" diff --git a/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/grid1.png b/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/grid1.png new file mode 100644 index 000000000..9a06f1399 Binary files /dev/null and b/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/grid1.png differ diff --git a/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/moregridsdrawio-1.png b/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/moregridsdrawio-1.png new file mode 100644 index 000000000..889eb0693 Binary files /dev/null and b/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/moregridsdrawio-1.png differ diff --git a/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/readme.md b/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/readme.md index c2fe847e5..5e69391bb 100644 --- a/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/readme.md +++ b/src/main/java/g3101_3200/s3148_maximum_difference_score_in_a_grid/readme.md @@ -10,7 +10,7 @@ Return the **maximum** total score you can achieve. **Example 1:** -![](https://assets.leetcode.com/uploads/2024/03/14/grid1.png) +![](grid1.png) **Input:** grid = [[9,5,7,3],[8,9,6,1],[6,7,14,3],[2,5,3,1]] @@ -26,7 +26,7 @@ The total score is `2 + 7 = 9`. **Example 2:** -![](https://assets.leetcode.com/uploads/2024/04/08/moregridsdrawio-1.png) +![](moregridsdrawio-1.png) **Input:** grid = [[4,3,2],[3,2,1]] diff --git a/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/example0gif.gif b/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/example0gif.gif new file mode 100644 index 000000000..834756c85 Binary files /dev/null and b/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/example0gif.gif differ diff --git a/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/example1gif.gif b/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/example1gif.gif new file mode 100644 index 000000000..1439f1bc6 Binary files /dev/null and b/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/example1gif.gif differ diff --git a/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/readme.md b/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/readme.md index 0a07e6091..1830781ca 100644 --- a/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/readme.md +++ b/src/main/java/g3101_3200/s3149_find_the_minimum_cost_array_permutation/readme.md @@ -16,7 +16,7 @@ Return the permutation `perm` which has the **minimum** possible score. If _mult **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/04/04/example0gif.gif)** +**![](example0gif.gif)** The lexicographically smallest permutation with minimum cost is `[0,1,2]`. The cost of this permutation is `|0 - 0| + |1 - 2| + |2 - 1| = 2`. @@ -28,7 +28,7 @@ The lexicographically smallest permutation with minimum cost is `[0,1,2]`. The c **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/04/04/example1gif.gif)** +**![](example1gif.gif)** The lexicographically smallest permutation with minimum cost is `[0,2,1]`. The cost of this permutation is `|0 - 1| + |2 - 2| + |1 - 0| = 2`. diff --git a/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/ezgifcom-crop.gif b/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/ezgifcom-crop.gif new file mode 100644 index 000000000..fac064945 Binary files /dev/null and b/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/ezgifcom-crop.gif differ diff --git a/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/ezgifcom-crop2.gif b/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/ezgifcom-crop2.gif new file mode 100644 index 000000000..438c47562 Binary files /dev/null and b/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/ezgifcom-crop2.gif differ diff --git a/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/readme.md b/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/readme.md index f132574a7..4c009321b 100644 --- a/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/readme.md +++ b/src/main/java/g3101_3200/s3160_find_the_number_of_distinct_colors_among_the_balls/readme.md @@ -18,7 +18,7 @@ Return an array `result` of length `n`, where `result[i]` denotes the number of **Explanation:** -![](https://assets.leetcode.com/uploads/2024/04/17/ezgifcom-crop.gif) +![](ezgifcom-crop.gif) * After query 0, ball 1 has color 4. * After query 1, ball 1 has color 4, and ball 2 has color 5. @@ -33,7 +33,7 @@ Return an array `result` of length `n`, where `result[i]` denotes the number of **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/04/17/ezgifcom-crop2.gif)** +**![](ezgifcom-crop2.gif)** * After query 0, ball 0 has color 1. * After query 1, ball 0 has color 1, and ball 1 has color 2. diff --git a/src/main/java/g3101_3200/s3161_block_placement_queries/example0block.png b/src/main/java/g3101_3200/s3161_block_placement_queries/example0block.png new file mode 100644 index 000000000..dcbde767d Binary files /dev/null and b/src/main/java/g3101_3200/s3161_block_placement_queries/example0block.png differ diff --git a/src/main/java/g3101_3200/s3161_block_placement_queries/example1block.png b/src/main/java/g3101_3200/s3161_block_placement_queries/example1block.png new file mode 100644 index 000000000..75c3edceb Binary files /dev/null and b/src/main/java/g3101_3200/s3161_block_placement_queries/example1block.png differ diff --git a/src/main/java/g3101_3200/s3161_block_placement_queries/readme.md b/src/main/java/g3101_3200/s3161_block_placement_queries/readme.md index 6775e99d0..135fa1010 100644 --- a/src/main/java/g3101_3200/s3161_block_placement_queries/readme.md +++ b/src/main/java/g3101_3200/s3161_block_placement_queries/readme.md @@ -19,7 +19,7 @@ Return a boolean array `results`, where `results[i]` is `true` if you can place **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/04/22/example0block.png)** +**![](example0block.png)** For query 0, place an obstacle at `x = 2`. A block of size at most 2 can be placed before `x = 3`. @@ -31,7 +31,7 @@ For query 0, place an obstacle at `x = 2`. A block of size at most 2 can be plac **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/04/22/example1block.png)** +**![](example1block.png)** * Place an obstacle at `x = 7` for query 0. A block of size at most 7 can be placed before `x = 7`. * Place an obstacle at `x = 2` for query 2. Now, a block of size at most 5 can be placed before `x = 7`, and a block of size at most 2 before `x = 2`. diff --git a/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/examplerect0.png b/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/examplerect0.png new file mode 100644 index 000000000..b84f01864 Binary files /dev/null and b/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/examplerect0.png differ diff --git a/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/examplerect1.png b/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/examplerect1.png new file mode 100644 index 000000000..7e316ba70 Binary files /dev/null and b/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/examplerect1.png differ diff --git a/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/readme.md b/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/readme.md index 2467b25a0..d0923444e 100644 --- a/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/readme.md +++ b/src/main/java/g3101_3200/s3195_find_the_minimum_area_to_cover_all_ones_i/readme.md @@ -14,7 +14,7 @@ Return the **minimum** possible area of the rectangle. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/08/examplerect0.png) +![](examplerect0.png) The smallest rectangle has a height of 2 and a width of 3, so it has an area of `2 * 3 = 6`. @@ -26,7 +26,7 @@ The smallest rectangle has a height of 2 and a width of 3, so it has an area of **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/08/examplerect1.png) +![](examplerect1.png) The smallest rectangle has both height and width 1, so its area is `1 * 1 = 1`. diff --git a/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/example0rect21.png b/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/example0rect21.png new file mode 100644 index 000000000..5c28e81ae Binary files /dev/null and b/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/example0rect21.png differ diff --git a/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/example1rect2.png b/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/example1rect2.png new file mode 100644 index 000000000..cf05b8110 Binary files /dev/null and b/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/example1rect2.png differ diff --git a/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/readme.md b/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/readme.md index e1d35dbbb..dda769132 100644 --- a/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/readme.md +++ b/src/main/java/g3101_3200/s3197_find_the_minimum_area_to_cover_all_ones_ii/readme.md @@ -16,7 +16,7 @@ Return the **minimum** possible sum of the area of these rectangles. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/14/example0rect21.png) +![](example0rect21.png) * The 1's at `(0, 0)` and `(1, 0)` are covered by a rectangle of area 2. * The 1's at `(0, 2)` and `(1, 2)` are covered by a rectangle of area 2. @@ -30,7 +30,7 @@ Return the **minimum** possible sum of the area of these rectangles. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/14/example1rect2.png) +![](example1rect2.png) * The 1's at `(0, 0)` and `(0, 2)` are covered by a rectangle of area 3. * The 1 at `(1, 1)` is covered by a rectangle of area 1. diff --git a/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/br.png b/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/br.png new file mode 100644 index 000000000..6a236d4ac Binary files /dev/null and b/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/br.png differ diff --git a/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/brb.png b/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/brb.png new file mode 100644 index 000000000..4709c9e37 Binary files /dev/null and b/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/brb.png differ diff --git a/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/readme.md b/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/readme.md index 6f6de85a3..b8436e07c 100644 --- a/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/readme.md +++ b/src/main/java/g3101_3200/s3200_maximum_height_of_a_triangle/readme.md @@ -16,7 +16,7 @@ Return the **maximum** _height of the triangle_ that can be achieved. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/16/brb.png) +![](brb.png) The only possible arrangement is shown above. @@ -28,7 +28,7 @@ The only possible arrangement is shown above. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/16/br.png) +![](br.png) The only possible arrangement is shown above. **Example 3:** @@ -45,7 +45,7 @@ The only possible arrangement is shown above. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/16/br.png) +![](br.png) The only possible arrangement is shown above. **Constraints:** diff --git a/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/example11-transformed.png b/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/example11-transformed.png new file mode 100644 index 000000000..791221e0d Binary files /dev/null and b/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/example11-transformed.png differ diff --git a/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/example211.png b/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/example211.png new file mode 100644 index 000000000..275ac9d9f Binary files /dev/null and b/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/example211.png differ diff --git a/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/readme.md b/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/readme.md index 27b313d83..a314074a1 100644 --- a/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/readme.md +++ b/src/main/java/g3201_3300/s3203_find_minimum_diameter_after_merging_two_trees/readme.md @@ -10,7 +10,7 @@ Return the **minimum** possible **diameter** of the resulting tree. The **diameter** of a tree is the length of the _longest_ path between any two nodes in the tree. -**Example 1:**![](https://assets.leetcode.com/uploads/2024/04/22/example11-transformed.png) +**Example 1:**![](example11-transformed.png) **Input:** edges1 = [[0,1],[0,2],[0,3]], edges2 = [[0,1]] @@ -22,7 +22,7 @@ We can obtain a tree of diameter 3 by connecting node 0 from the first tree with **Example 2:** -![](https://assets.leetcode.com/uploads/2024/04/22/example211.png) +![](example211.png) **Input:** edges1 = [[0,1],[0,2],[0,3],[2,4],[2,5],[3,6],[2,7]], edges2 = [[0,1],[0,2],[0,3],[2,4],[2,5],[3,6],[2,7]] diff --git a/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-47-491.png b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-47-491.png new file mode 100644 index 000000000..4e5fbc98a Binary files /dev/null and b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-47-491.png differ diff --git a/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-48-211.png b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-48-211.png new file mode 100644 index 000000000..40173fa9e Binary files /dev/null and b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-48-211.png differ diff --git a/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-49-351.png b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-49-351.png new file mode 100644 index 000000000..224d433df Binary files /dev/null and b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-49-351.png differ diff --git a/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-50-441.png b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-50-441.png new file mode 100644 index 000000000..0aa35b157 Binary files /dev/null and b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-50-441.png differ diff --git a/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-53-171.png b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-53-171.png new file mode 100644 index 000000000..1ea31b71a Binary files /dev/null and b/src/main/java/g3201_3300/s3206_alternating_groups_i/image_2024-05-16_23-53-171.png differ diff --git a/src/main/java/g3201_3300/s3206_alternating_groups_i/readme.md b/src/main/java/g3201_3300/s3206_alternating_groups_i/readme.md index 03dec61d4..18a6fd4eb 100644 --- a/src/main/java/g3201_3300/s3206_alternating_groups_i/readme.md +++ b/src/main/java/g3201_3300/s3206_alternating_groups_i/readme.md @@ -21,7 +21,7 @@ Return the number of **alternating** groups. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/16/image_2024-05-16_23-53-171.png) +![](image_2024-05-16_23-53-171.png) **Example 2:** @@ -31,11 +31,11 @@ Return the number of **alternating** groups. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/16/image_2024-05-16_23-47-491.png) +![](image_2024-05-16_23-47-491.png) Alternating groups: -**![](https://assets.leetcode.com/uploads/2024/05/16/image_2024-05-16_23-50-441.png)**![](https://assets.leetcode.com/uploads/2024/05/16/image_2024-05-16_23-48-211.png)**![](https://assets.leetcode.com/uploads/2024/05/16/image_2024-05-16_23-49-351.png)** +**![](image_2024-05-16_23-50-441.png)**![](image_2024-05-16_23-48-211.png)**![](image_2024-05-16_23-49-351.png)** **Constraints:** diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/readme.md b/src/main/java/g3201_3300/s3208_alternating_groups_ii/readme.md index 73b6d5591..7a5f78c48 100644 --- a/src/main/java/g3201_3300/s3208_alternating_groups_ii/readme.md +++ b/src/main/java/g3201_3300/s3208_alternating_groups_ii/readme.md @@ -21,11 +21,11 @@ Return the number of **alternating** groups. **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/19/screenshot-2024-05-28-183519.png)** +**![](screenshot-2024-05-28-183519.png)** Alternating groups: -![](https://assets.leetcode.com/uploads/2024/05/28/screenshot-2024-05-28-182448.png)![](https://assets.leetcode.com/uploads/2024/05/28/screenshot-2024-05-28-182844.png)![](https://assets.leetcode.com/uploads/2024/05/28/screenshot-2024-05-28-183057.png) +![](screenshot-2024-05-28-182448.png)![](screenshot-2024-05-28-182844.png)![](screenshot-2024-05-28-183057.png) **Example 2:** @@ -35,11 +35,11 @@ Alternating groups: **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/19/screenshot-2024-05-28-183907.png)** +**![](screenshot-2024-05-28-183907.png)** Alternating groups: -![](https://assets.leetcode.com/uploads/2024/06/19/screenshot-2024-05-28-184128.png)![](https://assets.leetcode.com/uploads/2024/06/19/screenshot-2024-05-28-184240.png) +![](screenshot-2024-05-28-184128.png)![](screenshot-2024-05-28-184240.png) **Example 3:** @@ -49,7 +49,7 @@ Alternating groups: **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/19/screenshot-2024-05-28-184516.png) +![](screenshot-2024-05-28-184516.png) **Constraints:** diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-182448.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-182448.png new file mode 100644 index 000000000..807d1a0aa Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-182448.png differ diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-182844.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-182844.png new file mode 100644 index 000000000..842d33689 Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-182844.png differ diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183057.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183057.png new file mode 100644 index 000000000..1559223e7 Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183057.png differ diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183519.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183519.png new file mode 100644 index 000000000..f87fb906d Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183519.png differ diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183907.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183907.png new file mode 100644 index 000000000..c4fde8821 Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-183907.png differ diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184128.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184128.png new file mode 100644 index 000000000..e53fb9066 Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184128.png differ diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184240.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184240.png new file mode 100644 index 000000000..d516080a1 Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184240.png differ diff --git a/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184516.png b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184516.png new file mode 100644 index 000000000..e9c963823 Binary files /dev/null and b/src/main/java/g3201_3300/s3208_alternating_groups_ii/screenshot-2024-05-28-184516.png differ diff --git a/src/main/java/g3201_3300/s3212_count_submatrices_with_equal_frequency_of_x_and_y/examplems.png b/src/main/java/g3201_3300/s3212_count_submatrices_with_equal_frequency_of_x_and_y/examplems.png new file mode 100644 index 000000000..e453505db Binary files /dev/null and b/src/main/java/g3201_3300/s3212_count_submatrices_with_equal_frequency_of_x_and_y/examplems.png differ diff --git a/src/main/java/g3201_3300/s3212_count_submatrices_with_equal_frequency_of_x_and_y/readme.md b/src/main/java/g3201_3300/s3212_count_submatrices_with_equal_frequency_of_x_and_y/readme.md index 5f0787647..6b6d218f1 100644 --- a/src/main/java/g3201_3300/s3212_count_submatrices_with_equal_frequency_of_x_and_y/readme.md +++ b/src/main/java/g3201_3300/s3212_count_submatrices_with_equal_frequency_of_x_and_y/readme.md @@ -16,7 +16,7 @@ Given a 2D character matrix `grid`, where `grid[i][j]` is either `'X'`, `'Y'`, o **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/07/examplems.png)** +**![](examplems.png)** **Example 2:** diff --git a/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample0.png b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample0.png new file mode 100644 index 000000000..03fdac1f4 Binary files /dev/null and b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample0.png differ diff --git a/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample1.png b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample1.png new file mode 100644 index 000000000..8c31fcaa1 Binary files /dev/null and b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample1.png differ diff --git a/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample2.png b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample2.png new file mode 100644 index 000000000..d3170b351 Binary files /dev/null and b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/linkedlistexample2.png differ diff --git a/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/readme.md b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/readme.md index 77883ba4b..75cfdaae2 100644 --- a/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/readme.md +++ b/src/main/java/g3201_3300/s3217_delete_nodes_from_linked_list_present_in_array/readme.md @@ -12,7 +12,7 @@ You are given an array of integers `nums` and the `head` of a linked list. Retur **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/11/linkedlistexample0.png)** +**![](linkedlistexample0.png)** Remove the nodes with values 1, 2, and 3. @@ -24,7 +24,7 @@ Remove the nodes with values 1, 2, and 3. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/11/linkedlistexample1.png) +![](linkedlistexample1.png) Remove the nodes with value 1. @@ -36,7 +36,7 @@ Remove the nodes with value 1. **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/11/linkedlistexample2.png)** +**![](linkedlistexample2.png)** No node has value 5. diff --git a/src/main/java/g3201_3300/s3218_minimum_cost_for_cutting_cake_i/ezgifcom-animated-gif-maker-1.gif b/src/main/java/g3201_3300/s3218_minimum_cost_for_cutting_cake_i/ezgifcom-animated-gif-maker-1.gif new file mode 100644 index 000000000..6f53ef8b8 Binary files /dev/null and b/src/main/java/g3201_3300/s3218_minimum_cost_for_cutting_cake_i/ezgifcom-animated-gif-maker-1.gif differ diff --git a/src/main/java/g3201_3300/s3218_minimum_cost_for_cutting_cake_i/readme.md b/src/main/java/g3201_3300/s3218_minimum_cost_for_cutting_cake_i/readme.md index 75eb03c6f..a508e4bf2 100644 --- a/src/main/java/g3201_3300/s3218_minimum_cost_for_cutting_cake_i/readme.md +++ b/src/main/java/g3201_3300/s3218_minimum_cost_for_cutting_cake_i/readme.md @@ -28,7 +28,7 @@ Return the **minimum** total cost to cut the entire cake into `1 x 1` pieces. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/04/ezgifcom-animated-gif-maker-1.gif) +![](ezgifcom-animated-gif-maker-1.gif) * Perform a cut on the vertical line 0 with cost 5, current total cost is 5. * Perform a cut on the horizontal line 0 on `3 x 1` subgrid with cost 1. diff --git a/src/main/java/g3201_3300/s3219_minimum_cost_for_cutting_cake_ii/ezgifcom-animated-gif-maker-1.gif b/src/main/java/g3201_3300/s3219_minimum_cost_for_cutting_cake_ii/ezgifcom-animated-gif-maker-1.gif new file mode 100644 index 000000000..6f53ef8b8 Binary files /dev/null and b/src/main/java/g3201_3300/s3219_minimum_cost_for_cutting_cake_ii/ezgifcom-animated-gif-maker-1.gif differ diff --git a/src/main/java/g3201_3300/s3219_minimum_cost_for_cutting_cake_ii/readme.md b/src/main/java/g3201_3300/s3219_minimum_cost_for_cutting_cake_ii/readme.md index ee28b98af..40cb4c48f 100644 --- a/src/main/java/g3201_3300/s3219_minimum_cost_for_cutting_cake_ii/readme.md +++ b/src/main/java/g3201_3300/s3219_minimum_cost_for_cutting_cake_ii/readme.md @@ -28,7 +28,7 @@ Return the **minimum** total cost to cut the entire cake into `1 x 1` pieces. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/04/ezgifcom-animated-gif-maker-1.gif) +![](ezgifcom-animated-gif-maker-1.gif) * Perform a cut on the vertical line 0 with cost 5, current total cost is 5. * Perform a cut on the horizontal line 0 on `3 x 1` subgrid with cost 1. diff --git a/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/one.png b/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/one.png new file mode 100644 index 000000000..8d7a56e23 Binary files /dev/null and b/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/one.png differ diff --git a/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/readme.md b/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/readme.md index 90081c6fc..4a1d05eb5 100644 --- a/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/readme.md +++ b/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/readme.md @@ -16,7 +16,7 @@ Return the **maximum** score that can be achieved after some number of operation **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/11/one.png) +![](one.png) In the first operation, we color all cells in column 1 down to row 3, and in the second operation, we color all cells in column 4 down to the last row. The score of the resulting grid is `grid[3][0] + grid[1][2] + grid[3][3]` which is equal to 11. @@ -28,7 +28,7 @@ In the first operation, we color all cells in column 1 down to row 3, and in the **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/11/two-1.png) +![](two-1.png) We perform operations on 1, 2, and 3 down to rows 1, 4, and 0, respectively. The score of the resulting grid is `grid[0][0] + grid[1][0] + grid[2][1] + grid[4][1] + grid[1][3] + grid[2][3] + grid[3][3] + grid[4][3] + grid[0][4]` which is equal to 94. diff --git a/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/two-1.png b/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/two-1.png new file mode 100644 index 000000000..9d84c454f Binary files /dev/null and b/src/main/java/g3201_3300/s3225_maximum_score_from_grid_operations/two-1.png differ diff --git a/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example0circle.png b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example0circle.png new file mode 100644 index 000000000..e20d934e0 Binary files /dev/null and b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example0circle.png differ diff --git a/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example1circle.png b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example1circle.png new file mode 100644 index 000000000..e497cca3f Binary files /dev/null and b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example1circle.png differ diff --git a/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example2circle1.png b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example2circle1.png new file mode 100644 index 000000000..4715dfacb Binary files /dev/null and b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/example2circle1.png differ diff --git a/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/readme.md b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/readme.md index d9c000a24..6fc021148 100644 --- a/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/readme.md +++ b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/readme.md @@ -16,7 +16,7 @@ Return `true` if such a path exists, and `false` otherwise. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/18/example2circle1.png) +![](example2circle1.png) The black curve shows a possible path between `(0, 0)` and `(3, 4)`. @@ -28,7 +28,7 @@ The black curve shows a possible path between `(0, 0)` and `(3, 4)`. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/18/example1circle.png) +![](example1circle.png) No path exists from `(0, 0)` to `(3, 3)`. @@ -40,7 +40,7 @@ No path exists from `(0, 0)` to `(3, 3)`. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/18/example0circle.png) +![](example0circle.png) No path exists from `(0, 0)` to `(3, 3)`. @@ -52,7 +52,7 @@ No path exists from `(0, 0)` to `(3, 3)`. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/07/31/rectangleexample5.png) +![](rectangleexample5.png) **Constraints:** diff --git a/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/rectangleexample5.png b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/rectangleexample5.png new file mode 100644 index 000000000..2c51c9034 Binary files /dev/null and b/src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/rectangleexample5.png differ diff --git a/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/readme.md b/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/readme.md index 0e89c8faa..541e46f25 100644 --- a/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/readme.md +++ b/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/readme.md @@ -18,7 +18,7 @@ Return the **minimum** number of cells that need to be flipped to make **either* **Explanation:** -![](https://assets.leetcode.com/uploads/2024/07/07/screenshot-from-2024-07-08-00-20-10.png) +![](screenshot-from-2024-07-08-00-20-10.png) Flipping the highlighted cells makes all the rows palindromic. @@ -30,7 +30,7 @@ Flipping the highlighted cells makes all the rows palindromic. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/07/07/screenshot-from-2024-07-08-00-31-23.png) +![](screenshot-from-2024-07-08-00-31-23.png) Flipping the highlighted cell makes all the columns palindromic. diff --git a/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/screenshot-from-2024-07-08-00-20-10.png b/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/screenshot-from-2024-07-08-00-20-10.png new file mode 100644 index 000000000..da106a0c9 Binary files /dev/null and b/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/screenshot-from-2024-07-08-00-20-10.png differ diff --git a/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/screenshot-from-2024-07-08-00-31-23.png b/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/screenshot-from-2024-07-08-00-31-23.png new file mode 100644 index 000000000..f5a2760c6 Binary files /dev/null and b/src/main/java/g3201_3300/s3239_minimum_number_of_flips_to_make_binary_grid_palindromic_i/screenshot-from-2024-07-08-00-31-23.png differ diff --git a/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/image.png b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/image.png new file mode 100644 index 000000000..56000669a Binary files /dev/null and b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/image.png differ diff --git a/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/readme.md b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/readme.md index 1d1a9765c..ad26950f0 100644 --- a/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/readme.md +++ b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/readme.md @@ -18,7 +18,7 @@ Return the **minimum** number of cells that need to be flipped to make **all** r **Explanation:** -![](https://assets.leetcode.com/uploads/2024/08/01/image.png) +![](image.png) **Example 2:** @@ -28,7 +28,7 @@ Return the **minimum** number of cells that need to be flipped to make **all** r **Explanation:** -![](https://assets.leetcode.com/uploads/2024/07/08/screenshot-from-2024-07-09-01-37-48.png) +![](screenshot-from-2024-07-09-01-37-48.png) **Example 3:** @@ -38,7 +38,7 @@ Return the **minimum** number of cells that need to be flipped to make **all** r **Explanation:** -![](https://assets.leetcode.com/uploads/2024/08/01/screenshot-from-2024-08-01-23-05-26.png) +![](screenshot-from-2024-08-01-23-05-26.png) **Constraints:** diff --git a/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/screenshot-from-2024-07-09-01-37-48.png b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/screenshot-from-2024-07-09-01-37-48.png new file mode 100644 index 000000000..da1a5f209 Binary files /dev/null and b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/screenshot-from-2024-07-09-01-37-48.png differ diff --git a/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/screenshot-from-2024-08-01-23-05-26.png b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/screenshot-from-2024-08-01-23-05-26.png new file mode 100644 index 000000000..17bf8fb8a Binary files /dev/null and b/src/main/java/g3201_3300/s3240_minimum_number_of_flips_to_make_binary_grid_palindromic_ii/screenshot-from-2024-08-01-23-05-26.png differ diff --git a/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/readme.md b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/readme.md index a64e0c6eb..3ebe317fe 100644 --- a/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/readme.md +++ b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/readme.md @@ -21,7 +21,7 @@ Return an array `times` where `times[i]` is the time when all nodes get marked i **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/01/screenshot-2024-06-02-122236.png) +![](screenshot-2024-06-02-122236.png) * For `i = 0`: * Node 1 is marked at `t = 1`, and Node 2 at `t = 2`. @@ -38,7 +38,7 @@ Return an array `times` where `times[i]` is the time when all nodes get marked i **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/01/screenshot-2024-06-02-122249.png) +![](screenshot-2024-06-02-122249.png) * For `i = 0`: * Node 1 is marked at `t = 1`. @@ -53,7 +53,7 @@ Return an array `times` where `times[i]` is the time when all nodes get marked i **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-2024-06-03-210550.png) +![](screenshot-2024-06-03-210550.png) **Constraints:** diff --git a/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-02-122236.png b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-02-122236.png new file mode 100644 index 000000000..946a246ec Binary files /dev/null and b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-02-122236.png differ diff --git a/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-02-122249.png b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-02-122249.png new file mode 100644 index 000000000..433e6062d Binary files /dev/null and b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-02-122249.png differ diff --git a/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-03-210550.png b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-03-210550.png new file mode 100644 index 000000000..17d75ffcd Binary files /dev/null and b/src/main/java/g3201_3300/s3241_time_taken_to_mark_all_nodes/screenshot-2024-06-03-210550.png differ diff --git a/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/design.png b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/design.png new file mode 100644 index 000000000..9eb0ac3d2 Binary files /dev/null and b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/design.png differ diff --git a/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/designexample0.png b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/designexample0.png new file mode 100644 index 000000000..946fd5a35 Binary files /dev/null and b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/designexample0.png differ diff --git a/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/designexample2.png b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/designexample2.png new file mode 100644 index 000000000..a8881b946 Binary files /dev/null and b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/designexample2.png differ diff --git a/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/readme.md b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/readme.md index e84038b26..578c472ec 100644 --- a/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/readme.md +++ b/src/main/java/g3201_3300/s3242_design_neighbor_sum_service/readme.md @@ -10,7 +10,7 @@ Implement the `neighborSum` class: * `int adjacentSum(int value)` returns the **sum** of elements which are adjacent neighbors of `value`, that is either to the top, left, right, or bottom of `value` in `grid`. * `int diagonalSum(int value)` returns the **sum** of elements which are diagonal neighbors of `value`, that is either to the top-left, top-right, bottom-left, or bottom-right of `value` in `grid`. -![](https://assets.leetcode.com/uploads/2024/06/24/design.png) +![](design.png) **Example 1:** @@ -24,7 +24,7 @@ Implement the `neighborSum` class: **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/24/designexample0.png)** +**![](designexample0.png)** * The adjacent neighbors of 1 are 0, 2, and 4. * The adjacent neighbors of 4 are 1, 3, 5, and 7. @@ -43,7 +43,7 @@ Implement the `neighborSum` class: **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/24/designexample2.png)** +**![](designexample2.png)** * The adjacent neighbors of 15 are 0, 10, 7, and 6. * The diagonal neighbors of 9 are 4, 12, 14, and 15. diff --git a/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image10.jpg b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image10.jpg new file mode 100644 index 000000000..9c8da128c Binary files /dev/null and b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image10.jpg differ diff --git a/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image11.jpg b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image11.jpg new file mode 100644 index 000000000..7e60e8bf8 Binary files /dev/null and b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image11.jpg differ diff --git a/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image12.jpg b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image12.jpg new file mode 100644 index 000000000..636661d7b Binary files /dev/null and b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image12.jpg differ diff --git a/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image8.jpg b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image8.jpg new file mode 100644 index 000000000..0b52cf4fe Binary files /dev/null and b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image8.jpg differ diff --git a/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image9.jpg b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image9.jpg new file mode 100644 index 000000000..37f22b08d Binary files /dev/null and b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/image9.jpg differ diff --git a/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/readme.md b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/readme.md index c1eab87a2..c7027a445 100644 --- a/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/readme.md +++ b/src/main/java/g3201_3300/s3243_shortest_distance_after_road_addition_queries_i/readme.md @@ -18,15 +18,15 @@ Return an array `answer` where for each `i` in the range `[0, queries.length - 1 **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/28/image8.jpg) +![](image8.jpg) After the addition of the road from 2 to 4, the length of the shortest path from 0 to 4 is 3. -![](https://assets.leetcode.com/uploads/2024/06/28/image9.jpg) +![](image9.jpg) After the addition of the road from 0 to 2, the length of the shortest path from 0 to 4 is 2. -![](https://assets.leetcode.com/uploads/2024/06/28/image10.jpg) +![](image10.jpg) After the addition of the road from 0 to 4, the length of the shortest path from 0 to 4 is 1. @@ -38,11 +38,11 @@ After the addition of the road from 0 to 4, the length of the shortest path from **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/28/image11.jpg) +![](image11.jpg) After the addition of the road from 0 to 3, the length of the shortest path from 0 to 3 is 1. -![](https://assets.leetcode.com/uploads/2024/06/28/image12.jpg) +![](image12.jpg) After the addition of the road from 0 to 2, the length of the shortest path remains 1. diff --git a/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image10.jpg b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image10.jpg new file mode 100644 index 000000000..9c8da128c Binary files /dev/null and b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image10.jpg differ diff --git a/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image11.jpg b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image11.jpg new file mode 100644 index 000000000..7e60e8bf8 Binary files /dev/null and b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image11.jpg differ diff --git a/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image12.jpg b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image12.jpg new file mode 100644 index 000000000..636661d7b Binary files /dev/null and b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image12.jpg differ diff --git a/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image8.jpg b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image8.jpg new file mode 100644 index 000000000..0b52cf4fe Binary files /dev/null and b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image8.jpg differ diff --git a/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image9.jpg b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image9.jpg new file mode 100644 index 000000000..37f22b08d Binary files /dev/null and b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/image9.jpg differ diff --git a/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/readme.md b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/readme.md index 4d6f354f9..e695974f2 100644 --- a/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/readme.md +++ b/src/main/java/g3201_3300/s3244_shortest_distance_after_road_addition_queries_ii/readme.md @@ -20,15 +20,15 @@ Return an array `answer` where for each `i` in the range `[0, queries.length - 1 **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/28/image8.jpg) +![](image8.jpg) After the addition of the road from 2 to 4, the length of the shortest path from 0 to 4 is 3. -![](https://assets.leetcode.com/uploads/2024/06/28/image9.jpg) +![](image9.jpg) After the addition of the road from 0 to 2, the length of the shortest path from 0 to 4 is 2. -![](https://assets.leetcode.com/uploads/2024/06/28/image10.jpg) +![](image10.jpg) After the addition of the road from 0 to 4, the length of the shortest path from 0 to 4 is 1. @@ -40,11 +40,11 @@ After the addition of the road from 0 to 4, the length of the shortest path from **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/28/image11.jpg) +![](image11.jpg) After the addition of the road from 0 to 3, the length of the shortest path from 0 to 3 is 1. -![](https://assets.leetcode.com/uploads/2024/06/28/image12.jpg) +![](image12.jpg) After the addition of the road from 0 to 2, the length of the shortest path remains 1. diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/readme.md b/src/main/java/g3201_3300/s3245_alternating_groups_iii/readme.md index 5e869ed84..69e4867ac 100644 --- a/src/main/java/g3201_3300/s3245_alternating_groups_iii/readme.md +++ b/src/main/java/g3201_3300/s3245_alternating_groups_iii/readme.md @@ -28,19 +28,19 @@ Return an array `answer` containing the results of the queries of the first type **Explanation:** -**![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-from-2024-06-03-20-14-44.png)** +**![](screenshot-from-2024-06-03-20-14-44.png)** First query: Change `colors[1]` to 0. -![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-from-2024-06-03-20-20-25.png) +![](screenshot-from-2024-06-03-20-20-25.png) Second query: Count of the alternating groups with size 4: -![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-from-2024-06-03-20-25-02-2.png)![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-from-2024-06-03-20-24-12.png) +![](screenshot-from-2024-06-03-20-25-02-2.png)![](screenshot-from-2024-06-03-20-24-12.png) **Example 2:** @@ -50,13 +50,13 @@ Count of the alternating groups with size 4: **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-from-2024-06-03-20-35-50.png) +![](screenshot-from-2024-06-03-20-35-50.png) First query: Count of the alternating groups with size 3: -![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-from-2024-06-03-20-37-13.png)![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-from-2024-06-03-20-36-40.png) +![](screenshot-from-2024-06-03-20-37-13.png)![](screenshot-from-2024-06-03-20-36-40.png) Second query: `colors` will not change. diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-14-44.png b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-14-44.png new file mode 100644 index 000000000..9dc91351b Binary files /dev/null and b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-14-44.png differ diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-20-25.png b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-20-25.png new file mode 100644 index 000000000..4328e2823 Binary files /dev/null and b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-20-25.png differ diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-24-12.png b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-24-12.png new file mode 100644 index 000000000..0f7c49656 Binary files /dev/null and b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-24-12.png differ diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-25-02-2.png b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-25-02-2.png new file mode 100644 index 000000000..49ee9723f Binary files /dev/null and b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-25-02-2.png differ diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-35-50.png b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-35-50.png new file mode 100644 index 000000000..893553612 Binary files /dev/null and b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-35-50.png differ diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-36-40.png b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-36-40.png new file mode 100644 index 000000000..caf114117 Binary files /dev/null and b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-36-40.png differ diff --git a/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-37-13.png b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-37-13.png new file mode 100644 index 000000000..6bca1b71e Binary files /dev/null and b/src/main/java/g3201_3300/s3245_alternating_groups_iii/screenshot-from-2024-06-03-20-37-13.png differ diff --git a/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/readme.md b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/readme.md index f406a5b7f..06acbb4f2 100644 --- a/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/readme.md +++ b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/readme.md @@ -18,7 +18,7 @@ A **subtree** of `treeName` is a tree consisting of a node in `treeName` and all **Explanation:** -![](https://assets.leetcode.com/uploads/2024/05/26/tree1.png) +![](tree1.png) All of the nodes of the given tree are good. @@ -30,7 +30,7 @@ All of the nodes of the given tree are good. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/06/03/screenshot-2024-06-03-193552.png) +![](screenshot-2024-06-03-193552.png) There are 6 good nodes in the given tree. They are colored in the image above. @@ -42,7 +42,7 @@ There are 6 good nodes in the given tree. They are colored in the image above. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/08/08/rob.jpg) +![](rob.jpg) All nodes except node 9 are good. diff --git a/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/rob.jpg b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/rob.jpg new file mode 100644 index 000000000..78cf21ae7 Binary files /dev/null and b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/rob.jpg differ diff --git a/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/screenshot-2024-06-03-193552.png b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/screenshot-2024-06-03-193552.png new file mode 100644 index 000000000..f9f3c9fb5 Binary files /dev/null and b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/screenshot-2024-06-03-193552.png differ diff --git a/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/tree1.png b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/tree1.png new file mode 100644 index 000000000..a8eb208f4 Binary files /dev/null and b/src/main/java/g3201_3300/s3249_count_the_number_of_good_nodes/tree1.png differ diff --git a/src/main/java/g3201_3300/s3256_maximum_value_sum_by_placing_three_rooks_i/readme.md b/src/main/java/g3201_3300/s3256_maximum_value_sum_by_placing_three_rooks_i/readme.md index 384583c5e..0321b8dd1 100644 --- a/src/main/java/g3201_3300/s3256_maximum_value_sum_by_placing_three_rooks_i/readme.md +++ b/src/main/java/g3201_3300/s3256_maximum_value_sum_by_placing_three_rooks_i/readme.md @@ -16,7 +16,7 @@ Return the **maximum** sum of the cell **values** on which the rooks are placed. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/08/08/rooks2.png) +![](rooks2.png) We can place the rooks in the cells `(0, 2)`, `(1, 3)`, and `(2, 1)` for a sum of `1 + 1 + 2 = 4`. diff --git a/src/main/java/g3201_3300/s3256_maximum_value_sum_by_placing_three_rooks_i/rooks2.png b/src/main/java/g3201_3300/s3256_maximum_value_sum_by_placing_three_rooks_i/rooks2.png new file mode 100644 index 000000000..03402f5b3 Binary files /dev/null and b/src/main/java/g3201_3300/s3256_maximum_value_sum_by_placing_three_rooks_i/rooks2.png differ diff --git a/src/main/java/g3201_3300/s3257_maximum_value_sum_by_placing_three_rooks_ii/readme.md b/src/main/java/g3201_3300/s3257_maximum_value_sum_by_placing_three_rooks_ii/readme.md index 6cd67b4ed..a541b1505 100644 --- a/src/main/java/g3201_3300/s3257_maximum_value_sum_by_placing_three_rooks_ii/readme.md +++ b/src/main/java/g3201_3300/s3257_maximum_value_sum_by_placing_three_rooks_ii/readme.md @@ -16,7 +16,7 @@ Return the **maximum** sum of the cell **values** on which the rooks are placed. **Explanation:** -![](https://assets.leetcode.com/uploads/2024/08/08/rooks2.png) +![](rooks2.png) We can place the rooks in the cells `(0, 2)`, `(1, 3)`, and `(2, 1)` for a sum of `1 + 1 + 2 = 4`. diff --git a/src/main/java/g3201_3300/s3257_maximum_value_sum_by_placing_three_rooks_ii/rooks2.png b/src/main/java/g3201_3300/s3257_maximum_value_sum_by_placing_three_rooks_ii/rooks2.png new file mode 100644 index 000000000..03402f5b3 Binary files /dev/null and b/src/main/java/g3201_3300/s3257_maximum_value_sum_by_placing_three_rooks_ii/rooks2.png differ