Skip to content

Commit 1b489d8

Browse files
authored
Updated readme
1 parent 54caa3f commit 1b489d8

File tree

2 files changed

+105
-106
lines changed
  • src/main/java/g1301_1400/s1333_filter_restaurants_by_vegan_friendly_price_and_distance

2 files changed

+105
-106
lines changed

README.md

Lines changed: 104 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
[![](https://img.shields.io/github/forks/javadev/LeetCode-in-Java?label=Fork%20me%20on%20GitHub%20&style=flat-square)](https://github.com/javadev/LeetCode-in-Java/fork)
33
> ["For coding interview preparation, LeetCode is one of the best online resource providing a rich library of more than 300 real coding interview questions for you to practice from using one of the 7 supported languages - C, C++, Java, Python, C#, JavaScript, Ruby."](https://www.quora.com/How-effective-is-Leetcode-for-preparing-for-technical-interviews)
44

5-
* [Algorithm I](#algorithm-i)
65
* [Algorithm II](#algorithm-ii)
76
* [Binary Search I](#binary-search-i)
87
* [Binary Search II](#binary-search-ii)
@@ -16,109 +15,7 @@
1615
* [Udemy](#udemy)
1716
* [Data Structure I](#data-structure-i)
1817
* [Data Structure II](#data-structure-ii)
19-
20-
### Algorithm I
21-
22-
#### Day 1 Binary Search
23-
24-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
25-
|-|-|-|-|-|-
26-
| 0704 |[Binary Search](src/main/java/g0701_0800/s0704_binary_search)| Easy | Array, Binary_Search | 0 | 100.00
27-
| 0278 |[First Bad Version](src/main/java/g0201_0300/s0278_first_bad_version)| Easy | Binary_Search, Interactive | 15 | 87.89
28-
| 0035 |[Search Insert Position](src/main/java/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 0 | 100.00
29-
30-
#### Day 2 Two Pointers
31-
32-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
33-
|-|-|-|-|-|-
34-
| 0977 |[Squares of a Sorted Array](src/main/java/g0901_1000/s0977_squares_of_a_sorted_array)| Easy | Array, Sorting, Two_Pointers | 1 | 100.00
35-
| 0189 |[Rotate Array](src/main/java/g0101_0200/s0189_rotate_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 0 | 100.00
36-
37-
#### Day 3 Two Pointers
38-
39-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
40-
|-|-|-|-|-|-
41-
| 0283 |[Move Zeroes](src/main/java/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 2 | 79.54
42-
| 0167 |[Two Sum II - Input Array Is Sorted](src/main/java/g0101_0200/s0167_two_sum_ii_input_array_is_sorted)| Medium | Array, Binary_Search, Two_Pointers | 1 | 99.21
43-
44-
#### Day 4 Two Pointers
45-
46-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
47-
|-|-|-|-|-|-
48-
| 0344 |[Reverse String](src/main/java/g0301_0400/s0344_reverse_string)| Easy | Top_Interview_Questions, String, Two_Pointers, Recursion | 1 | 99.91
49-
| 0557 |[Reverse Words in a String III](src/main/java/g0501_0600/s0557_reverse_words_in_a_string_iii)| Easy | String, Two_Pointers | 4 | 97.75
50-
51-
#### Day 5 Two Pointers
52-
53-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
54-
|-|-|-|-|-|-
55-
| 0876 |[Middle of the Linked List](src/main/java/g0801_0900/s0876_middle_of_the_linked_list)| Easy | Two_Pointers, Linked_List | 0 | 100.00
56-
| 0019 |[Remove Nth Node From End of List](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Big_O_Time_O(L)_Space_O(L) | 0 | 100.00
57-
58-
#### Day 6 Sliding Window
59-
60-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
61-
|-|-|-|-|-|-
62-
| 0003 |[Longest Substring Without Repeating Characters](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n)_Space_O(1) | 2 | 99.88
63-
| 0567 |[Permutation in String](src/main/java/g0501_0600/s0567_permutation_in_string)| Medium | String, Hash_Table, Two_Pointers, Sliding_Window | 5 | 93.93
64-
65-
#### Day 7 Breadth First Search Depth First Search
66-
67-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
68-
|-|-|-|-|-|-
69-
| 0733 |[Flood Fill](src/main/java/g0701_0800/s0733_flood_fill)| Easy | Array, Depth_First_Search, Breadth_First_Search, Matrix | 1 | 85.36
70-
| 0695 |[Max Area of Island](src/main/java/g0601_0700/s0695_max_area_of_island)| Medium | Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find | 3 | 76.79
71-
72-
#### Day 8 Breadth First Search Depth First Search
73-
74-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
75-
|-|-|-|-|-|-
76-
| 0617 |[Merge Two Binary Trees](src/main/java/g0601_0700/s0617_merge_two_binary_trees)| Easy | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 1 | 72.47
77-
| 0116 |[Populating Next Right Pointers in Each Node](src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node)| Medium | Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Linked_List | 0 | 100.00
78-
79-
#### Day 9 Breadth First Search Depth First Search
80-
81-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
82-
|-|-|-|-|-|-
83-
| 0542 |[01 Matrix](src/main/java/g0501_0600/s0542_01_matrix)| Medium | Array, Dynamic_Programming, Breadth_First_Search, Matrix | 7 | 95.83
84-
| 0994 |[Rotting Oranges](src/main/java/g0901_1000/s0994_rotting_oranges)| Medium | Array, Breadth_First_Search, Matrix | 3 | 74.27
85-
86-
#### Day 10 Recursion Backtracking
87-
88-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
89-
|-|-|-|-|-|-
90-
| 0021 |[Merge Two Sorted Lists](src/main/java/g0001_0100/s0021_merge_two_sorted_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(m+n)_Space_O(m+n) | 0 | 100.00
91-
| 0206 |[Reverse Linked List](src/main/java/g0201_0300/s0206_reverse_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(N)_Space_O(1) | 0 | 100.00
92-
93-
#### Day 11 Recursion Backtracking
94-
95-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
96-
|-|-|-|-|-|-
97-
| 0077 |[Combinations](src/main/java/g0001_0100/s0077_combinations)| Medium | Backtracking | 11 | 77.40
98-
| 0046 |[Permutations](src/main/java/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 1 | 95.07
99-
| 0784 |[Letter Case Permutation](src/main/java/g0701_0800/s0784_letter_case_permutation)| Medium | String, Bit_Manipulation, Backtracking | 10 | 40.38
100-
101-
#### Day 12 Dynamic Programming
102-
103-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
104-
|-|-|-|-|-|-
105-
| 0070 |[Climbing Stairs](src/main/java/g0001_0100/s0070_climbing_stairs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Big_O_Time_O(n)_Space_O(n) | 0 | 100.00
106-
| 0198 |[House Robber](src/main/java/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 0 | 100.00
107-
| 0120 |[Triangle](src/main/java/g0101_0200/s0120_triangle)| Medium | Array, Dynamic_Programming | 2 | 94.63
108-
109-
#### Day 13 Bit Manipulation
110-
111-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
112-
|-|-|-|-|-|-
113-
| 0231 |[Power of Two](src/main/java/g0201_0300/s0231_power_of_two)| Easy | Math, Bit_Manipulation, Recursion | 1 | 100.00
114-
| 0191 |[Number of 1 Bits](src/main/java/g0101_0200/s0191_number_of_1_bits)| Easy | Top_Interview_Questions, Bit_Manipulation | 1 | 84.87
115-
116-
#### Day 14 Bit Manipulation
117-
118-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
119-
|-|-|-|-|-|-
120-
| 0190 |[Reverse Bits](src/main/java/g0101_0200/s0190_reverse_bits)| Easy | Top_Interview_Questions, Bit_Manipulation, Divide_and_Conquer | 1 | 98.66
121-
| 0136 |[Single Number](src/main/java/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 1 | 99.97
18+
* [Algorithm I](#algorithm-i)
12219

12320
### Algorithm II
12421

@@ -1812,6 +1709,109 @@
18121709
| 0451 |[Sort Characters By Frequency](src/main/java/g0401_0500/s0451_sort_characters_by_frequency)| Medium | String, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Bucket_Sort | 13 | 89.63
18131710
| 0973 |[K Closest Points to Origin](src/main/java/g0901_1000/s0973_k_closest_points_to_origin)| Medium | Array, Math, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Geometry, Quickselect | 4 | 98.26
18141711

1712+
### Algorithm I
1713+
1714+
#### Day 1 Binary Search
1715+
1716+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1717+
|-|-|-|-|-|-
1718+
| 0704 |[Binary Search](src/main/java/g0701_0800/s0704_binary_search)| Easy | Array, Binary_Search | 0 | 100.00
1719+
| 0278 |[First Bad Version](src/main/java/g0201_0300/s0278_first_bad_version)| Easy | Binary_Search, Interactive | 15 | 87.89
1720+
| 0035 |[Search Insert Position](src/main/java/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 0 | 100.00
1721+
1722+
#### Day 2 Two Pointers
1723+
1724+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1725+
|-|-|-|-|-|-
1726+
| 0977 |[Squares of a Sorted Array](src/main/java/g0901_1000/s0977_squares_of_a_sorted_array)| Easy | Array, Sorting, Two_Pointers | 1 | 100.00
1727+
| 0189 |[Rotate Array](src/main/java/g0101_0200/s0189_rotate_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 0 | 100.00
1728+
1729+
#### Day 3 Two Pointers
1730+
1731+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1732+
|-|-|-|-|-|-
1733+
| 0283 |[Move Zeroes](src/main/java/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 2 | 79.54
1734+
| 0167 |[Two Sum II - Input Array Is Sorted](src/main/java/g0101_0200/s0167_two_sum_ii_input_array_is_sorted)| Medium | Array, Binary_Search, Two_Pointers | 1 | 99.21
1735+
1736+
#### Day 4 Two Pointers
1737+
1738+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1739+
|-|-|-|-|-|-
1740+
| 0344 |[Reverse String](src/main/java/g0301_0400/s0344_reverse_string)| Easy | Top_Interview_Questions, String, Two_Pointers, Recursion | 1 | 99.91
1741+
| 0557 |[Reverse Words in a String III](src/main/java/g0501_0600/s0557_reverse_words_in_a_string_iii)| Easy | String, Two_Pointers | 4 | 97.75
1742+
1743+
#### Day 5 Two Pointers
1744+
1745+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1746+
|-|-|-|-|-|-
1747+
| 0876 |[Middle of the Linked List](src/main/java/g0801_0900/s0876_middle_of_the_linked_list)| Easy | Two_Pointers, Linked_List | 0 | 100.00
1748+
| 0019 |[Remove Nth Node From End of List](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Big_O_Time_O(L)_Space_O(L) | 0 | 100.00
1749+
1750+
#### Day 6 Sliding Window
1751+
1752+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1753+
|-|-|-|-|-|-
1754+
| 0003 |[Longest Substring Without Repeating Characters](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n)_Space_O(1) | 2 | 99.88
1755+
| 0567 |[Permutation in String](src/main/java/g0501_0600/s0567_permutation_in_string)| Medium | String, Hash_Table, Two_Pointers, Sliding_Window | 5 | 93.93
1756+
1757+
#### Day 7 Breadth First Search Depth First Search
1758+
1759+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1760+
|-|-|-|-|-|-
1761+
| 0733 |[Flood Fill](src/main/java/g0701_0800/s0733_flood_fill)| Easy | Array, Depth_First_Search, Breadth_First_Search, Matrix | 1 | 85.36
1762+
| 0695 |[Max Area of Island](src/main/java/g0601_0700/s0695_max_area_of_island)| Medium | Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find | 3 | 76.79
1763+
1764+
#### Day 8 Breadth First Search Depth First Search
1765+
1766+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1767+
|-|-|-|-|-|-
1768+
| 0617 |[Merge Two Binary Trees](src/main/java/g0601_0700/s0617_merge_two_binary_trees)| Easy | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 1 | 72.47
1769+
| 0116 |[Populating Next Right Pointers in Each Node](src/main/java/g0101_0200/s0116_populating_next_right_pointers_in_each_node)| Medium | Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Linked_List | 0 | 100.00
1770+
1771+
#### Day 9 Breadth First Search Depth First Search
1772+
1773+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1774+
|-|-|-|-|-|-
1775+
| 0542 |[01 Matrix](src/main/java/g0501_0600/s0542_01_matrix)| Medium | Array, Dynamic_Programming, Breadth_First_Search, Matrix | 7 | 95.83
1776+
| 0994 |[Rotting Oranges](src/main/java/g0901_1000/s0994_rotting_oranges)| Medium | Array, Breadth_First_Search, Matrix | 3 | 74.27
1777+
1778+
#### Day 10 Recursion Backtracking
1779+
1780+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1781+
|-|-|-|-|-|-
1782+
| 0021 |[Merge Two Sorted Lists](src/main/java/g0001_0100/s0021_merge_two_sorted_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(m+n)_Space_O(m+n) | 0 | 100.00
1783+
| 0206 |[Reverse Linked List](src/main/java/g0201_0300/s0206_reverse_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(N)_Space_O(1) | 0 | 100.00
1784+
1785+
#### Day 11 Recursion Backtracking
1786+
1787+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1788+
|-|-|-|-|-|-
1789+
| 0077 |[Combinations](src/main/java/g0001_0100/s0077_combinations)| Medium | Backtracking | 11 | 77.40
1790+
| 0046 |[Permutations](src/main/java/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 1 | 95.07
1791+
| 0784 |[Letter Case Permutation](src/main/java/g0701_0800/s0784_letter_case_permutation)| Medium | String, Bit_Manipulation, Backtracking | 10 | 40.38
1792+
1793+
#### Day 12 Dynamic Programming
1794+
1795+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1796+
|-|-|-|-|-|-
1797+
| 0070 |[Climbing Stairs](src/main/java/g0001_0100/s0070_climbing_stairs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Big_O_Time_O(n)_Space_O(n) | 0 | 100.00
1798+
| 0198 |[House Robber](src/main/java/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 0 | 100.00
1799+
| 0120 |[Triangle](src/main/java/g0101_0200/s0120_triangle)| Medium | Array, Dynamic_Programming | 2 | 94.63
1800+
1801+
#### Day 13 Bit Manipulation
1802+
1803+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1804+
|-|-|-|-|-|-
1805+
| 0231 |[Power of Two](src/main/java/g0201_0300/s0231_power_of_two)| Easy | Math, Bit_Manipulation, Recursion | 1 | 100.00
1806+
| 0191 |[Number of 1 Bits](src/main/java/g0101_0200/s0191_number_of_1_bits)| Easy | Top_Interview_Questions, Bit_Manipulation | 1 | 84.87
1807+
1808+
#### Day 14 Bit Manipulation
1809+
1810+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1811+
|-|-|-|-|-|-
1812+
| 0190 |[Reverse Bits](src/main/java/g0101_0200/s0190_reverse_bits)| Easy | Top_Interview_Questions, Bit_Manipulation, Divide_and_Conquer | 1 | 98.66
1813+
| 0136 |[Single Number](src/main/java/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 1 | 99.97
1814+
18151815
## Algorithms
18161816

18171817
| # | Title | Difficulty | Tag | Time, ms | Time, %

src/main/java/g1301_1400/s1333_filter_restaurants_by_vegan_friendly_price_and_distance/readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ After filter restaurants with veganFriendly = 1, maxPrice = 50 and maxDistance =
5959
```java
6060
import java.util.ArrayList;
6161
import java.util.List;
62-
import java.util.stream.Collectors;
6362

6463
public class Solution {
6564
public List<Integer> filterRestaurants(
@@ -73,7 +72,7 @@ public class Solution {
7372
}
7473
}
7574
list.sort((a, b) -> b[1] - a[1] == 0 ? b[0] - a[0] : b[1] - a[1]);
76-
return list.stream().map(restaurant -> restaurant[0]).collect(Collectors.toList());
75+
return list.stream().map(restaurant -> restaurant[0]).toList();
7776
}
7877
}
7978
```

0 commit comments

Comments
 (0)