File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -7,39 +7,39 @@ const Tips = () => {
7
7
const input = `
8
8
\`\`\`md
9
9
If input array is sorted then
10
- - Binary search
11
- - Two pointers
10
+ - Binary search
11
+ - Two pointers
12
12
13
13
If asked for all permutations/subsets then
14
- - Backtracking
14
+ - Backtracking
15
15
16
16
If given a tree then
17
- - DFS
18
- - BFS
17
+ - DFS
18
+ - BFS
19
19
20
20
If given a graph then
21
- - DFS
22
- - BFS
21
+ - DFS
22
+ - BFS
23
23
24
24
If given a linked list then
25
- - Two pointers
25
+ - Two pointers
26
26
27
27
If recursion is banned then
28
- - Stack
28
+ - Stack
29
29
30
30
If asked for maximum/minumum subarray/subset/options then
31
- - Dynamic programming
31
+ - Dynamic programming
32
32
33
33
If asked for top/least K items then
34
- - Heap
34
+ - Heap
35
35
36
36
If asked for common strings then
37
- - Map
38
- - Trie
37
+ - Map
38
+ - Trie
39
39
40
40
Else
41
- - Map/Set for O(1) time & O(n) space
42
- - Sort input for O(nlogn) time and O(1) space
41
+ - Map/Set for O(1) time & O(n) space
42
+ - Sort input for O(nlogn) time and O(1) space
43
43
\`\`\`` ;
44
44
45
45
return < ReactMarkdown className = "tips" source = { input } /> ;
You can’t perform that action at this time.
0 commit comments