You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,10 +20,11 @@ repeatedly applying common patterns rather than randomly tackling questions.
22
20
23
21
All questions are available on [leetcode.com] with some requiring [leetcode premium].
24
22
25
-
## Preface
23
+
## Fundamentals
26
24
27
-
It is highly recommended to read chapters 1, 2, 3, 4, 8, and 10 of [Cracking The Coding Interview]
28
-
to familiarize yourself with the following data structures and their operations:
25
+
To find the greatest amount of success when practicing, it is highly recommended
26
+
to know the methods and runtimes of the following data structures and their
27
+
operations:
29
28
30
29
- Arrays
31
30
- Maps
@@ -45,7 +44,7 @@ In addition, you should have a good grasp on common algorithms such as:
45
44
46
45
## Notes
47
46
48
-
[This pdf] contains useful information for the built-in data structures in Java.
47
+
[This pdf] contains information for the main data structures in Java.
49
48
50
49
Other useful methods to know include [`substring()`](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#substring-int-int-), [`toCharArray()`](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#toCharArray--), [`Math.max()`](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#max-int-int-),
51
50
[`Math.min()`](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#min-int-int-), and [`Arrays.fill()`](https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#fill-int:A-int-).
@@ -55,62 +54,10 @@ Other useful methods to know include [`substring()`](https://docs.oracle.com/jav
55
54
The entire question list can be found here:
56
55
https://seanprashad.com/leetcode-patterns/.
57
56
58
-
In addition to viewing the question list, companies that have previously asked
59
-
the question in the past 6 months (_as of May 2021_) will be listed. You can
60
-
also use the checkboxes to mark which questions you've completed!
61
-
62
57
## Solutions
63
58
64
59
Solutions written in Java can be found in the [solutions] branch.
65
60
66
-
## Leetcode Discuss
67
-
68
-
[Leetcode discuss] is an amazing resource and features previous interview
69
-
questions, as well as compensation and general career advice.
70
-
71
-
## Tips to Consider
72
-
73
-
```
74
-
If input array is sorted then
75
-
- Binary search
76
-
- Two pointers
77
-
78
-
If asked for all permutations/subsets then
79
-
- Backtracking
80
-
81
-
If given a tree then
82
-
- DFS
83
-
- BFS
84
-
85
-
If given a graph then
86
-
- DFS
87
-
- BFS
88
-
89
-
If given a linked list then
90
-
- Two pointers
91
-
92
-
If recursion is banned then
93
-
- Stack
94
-
95
-
If must solve in-place then
96
-
- Swap corresponding values
97
-
- Store one or more different values in the same pointer
98
-
99
-
If asked for maximum/minimum subarray/subset/options then
100
-
- Dynamic programming
101
-
102
-
If asked for top/least K items then
103
-
- Heap
104
-
105
-
If asked for common strings then
106
-
- Map
107
-
- Trie
108
-
109
-
Else
110
-
- Map/Set for O(1) time & O(n) space
111
-
- Sort input for O(nlogn) time and O(1) space
112
-
```
113
-
114
61
## Suggestions
115
62
116
63
Think a question should/shouldn't be included? Wish there was another feature?
@@ -119,18 +66,13 @@ Feel free to open an [issue] with your suggestion!
119
66
## Acknowledgements
120
67
121
68
This list is heavily inspired from [Grokking the Coding Interview] with
122
-
additional problems extracted from the [Blind 75 list] and this medium article
69
+
additional problems extracted from the [Blind 75 list] and this hackernoon article
123
70
on [14 patterns to ace any coding interview question].
0 commit comments