Skip to content

Commit 56b015a

Browse files
committed
[feig] misc: tweak formatting
1 parent f9184c2 commit 56b015a

File tree

19 files changed

+286
-278
lines changed

19 files changed

+286
-278
lines changed

packages/front-end-interview-guidebook/contents/algorithms/en-US.langnostic.json

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"b6465b86",
1616
"13cff95f",
1717
"493e8bd0",
18-
"3410e584",
18+
"cafc8a5",
1919
"c97eaa3d",
2020
"d48a7b71",
2121
"421ceb04",
@@ -26,21 +26,24 @@
2626
"4ca7a565",
2727
"b6dbe2f3",
2828
"bf28427a",
29-
"1ec4f54b",
29+
"18266525",
30+
"eb62450d",
3031
"2b74a214",
3132
"e1befcaf",
32-
"6aa83ba1",
33+
"91a15981",
34+
"20071352",
3335
"e2bac672",
3436
"71a2a58",
35-
"9182d691",
37+
"d3f51453",
38+
"a3c5b92",
3639
"206a5a5b",
37-
"5fffab6e",
40+
"9a27365c",
3841
"686cd762",
39-
"12ba9aaa",
42+
"eeb9a3b2",
4043
"51300c2d",
41-
"193688c6",
44+
"101a24ed",
4245
"3276416d",
43-
"a004e1c1",
46+
"9b54825a",
4447
"db9fea03"
4548
]
4649
},
@@ -51,7 +54,7 @@
5154
"b6465b86",
5255
"13cff95f",
5356
"493e8bd0",
54-
"3410e584",
57+
"cafc8a5",
5558
"c97eaa3d",
5659
"d48a7b71",
5760
"421ceb04",
@@ -62,21 +65,24 @@
6265
"4ca7a565",
6366
"b6dbe2f3",
6467
"bf28427a",
65-
"1ec4f54b",
68+
"18266525",
69+
"eb62450d",
6670
"2b74a214",
6771
"e1befcaf",
68-
"6aa83ba1",
72+
"91a15981",
73+
"20071352",
6974
"e2bac672",
7075
"71a2a58",
71-
"9182d691",
76+
"d3f51453",
77+
"a3c5b92",
7278
"206a5a5b",
73-
"5fffab6e",
79+
"9a27365c",
7480
"686cd762",
75-
"12ba9aaa",
81+
"eeb9a3b2",
7682
"51300c2d",
77-
"193688c6",
83+
"101a24ed",
7884
"3276416d",
79-
"a004e1c1",
85+
"9b54825a",
8086
"db9fea03"
8187
]
8288
}

packages/front-end-interview-guidebook/contents/algorithms/en-US.mdx

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ There are a ton of resources out there that cover algorithmic coding interviews
1818

1919
## Examples
2020

21-
- Reverse a linked list.
22-
- Determine if a string contains balanced brackets.
23-
- Determine how many substrings in a string are palindromes.
21+
- Reverse a linked list
22+
- Determine if a string contains balanced brackets
23+
- Determine how many substrings in a string are palindromes
2424

2525
## How to prepare
2626

@@ -48,78 +48,78 @@ Be aware of the common JavaScript operations and their time complexities.
4848

4949
### `Array`
5050

51-
| Operation | Time complexity |
52-
| --------------------------- | --------------- |
53-
| `Array.prototype.concat()` | O(m + n) |
54-
| `Array.prototype.every()` | O(n) |
55-
| `Array.prototype.fill()` | O(n) |
56-
| `Array.prototype.filter()` | O(n) |
57-
| `Array.prototype.find()` | O(n) |
58-
| `Array.prototype.pop()` | O(1) |
59-
| `Array.prototype.push()` | O(1) |
60-
| `Array.prototype.reduce()` | O(n) |
61-
| `Array.prototype.reverse()` | O(n) |
62-
| `Array.prototype.shift()` | O(n) |
63-
| `Array.prototype.slice()` | O(n) |
64-
| `Array.prototype.some()` | O(n) |
65-
| `Array.prototype.sort()` | O(nlgn) |
66-
| `Array.prototype.splice()` | O(n) |
67-
| `Array.prototype.unshift()` | O(m + n) |
51+
Array operations and their time complexity:
52+
53+
- `Array.prototype.concat()`: O(m + n)
54+
- `Array.prototype.every()`: O(n)
55+
- `Array.prototype.fill()`: O(n)
56+
- `Array.prototype.filter()`: O(n)
57+
- `Array.prototype.find()`: O(n)
58+
- `Array.prototype.pop()`: O(1)
59+
- `Array.prototype.push()`: O(1)
60+
- `Array.prototype.reduce()`: O(n)
61+
- `Array.prototype.reverse()`: O(n)
62+
- `Array.prototype.shift()`: O(n)
63+
- `Array.prototype.slice()`: O(n)
64+
- `Array.prototype.some()`: O(n)
65+
- `Array.prototype.sort()`: O(nlgn)
66+
- `Array.prototype.splice()`: O(n)
67+
- `Array.prototype.unshift()`: O(m + n)
6868

6969
<sup>*</sup> `n` is the number of elements in the array and `m` is the number of
7070
elements to be added.
7171

7272
### `Map`
7373

74-
| Operation | Time complexity |
75-
| --- | --- |
76-
| `Map.prototype.clear()` | O(n) |
77-
| `Map.prototype.delete()` | O(1) |
78-
| `Map.prototype.entries()` | O(1) because it returns an iterator. Getting all the entries will take O(n) time. |
79-
| `Map.prototype.forEach()` | O(n) |
80-
| `Map.prototype.get()` | O(1) |
81-
| `Map.prototype.has()` | O(1) |
82-
| `Map.prototype.keys()` | O(1) because it returns an iterator. Getting all the keys will take O(n) time. |
83-
| `Map.prototype.set()` | O(1) |
84-
| `Map.prototype.values()` | O(1) because it returns an iterator. Getting all the values will take O(n) time. |
74+
Map operations and their time complexity:
75+
76+
- `Map.prototype.clear()`: O(n)
77+
- `Map.prototype.delete()`: O(1)
78+
- `Map.prototype.entries()`: O(1) because it returns an iterator. Getting all the entries will take O(n) time
79+
- `Map.prototype.forEach()`: O(n)
80+
- `Map.prototype.get()`: O(1)
81+
- `Map.prototype.has()`: O(1)
82+
- `Map.prototype.keys()`: O(1) because it returns an iterator. Getting all the keys will take O(n) time
83+
- `Map.prototype.set()`: O(1)
84+
- `Map.prototype.values()`: O(1) because it returns an iterator. Getting all the values will take O(n) time
8585

8686
<sup>*</sup> `n` is the number of keys in the map.
8787

8888
### `Set`
8989

90-
| Operation | Time complexity |
91-
| --- | --- |
92-
| `Set.prototype.add()` | O(1) |
93-
| `Set.prototype.clear()` | O(n) |
94-
| `Set.prototype.delete()` | O(1) |
95-
| `Set.prototype.entries()` | O(1) because it returns an iterator. Getting all the entries will take O(n) time. |
96-
| `Set.prototype.forEach()` | O(n) |
97-
| `Set.prototype.has()` | O(1) |
98-
| `Set.prototype.keys()` | O(1) because it returns an iterator. Getting all the keys will take O(n) time. |
99-
| `Set.prototype.values()` | O(1) because it returns an iterator. Getting all the values will take O(n) time. |
90+
Set operations and their time complexity:
91+
92+
- `Set.prototype.add()`: O(1)
93+
- `Set.prototype.clear()`: O(n)
94+
- `Set.prototype.delete()`: O(1)
95+
- `Set.prototype.entries()`: O(1) because it returns an iterator. Getting all the entries will take O(n) time
96+
- `Set.prototype.forEach()`: O(n)
97+
- `Set.prototype.has()`: O(1)
98+
- `Set.prototype.keys()`: O(1) because it returns an iterator. Getting all the keys will take O(n) time
99+
- `Set.prototype.values()`: O(1) because it returns an iterator. Getting all the values will take O(n) time
100100

101101
<sup>*</sup> `n` is the number of elements in the set.
102102

103-
## Algorithmic coding interview rubrics
103+
## Evaluation axes
104104

105105
During algorithmic coding interviews, interviewers are evaluating candidates on the following skills:
106106

107-
- **Problem solving**: Use a systematic and logical approach to understanding and addressing a problem. Break down the problem into smaller independent problems. Evaluate different approaches and their tradeoffs.
108-
- **Technical competence**: Ability to translate solutions into working code and demonstrating a strong understanding of the language being used.
109-
- **Communication**: Ask questions to clarify details and clearly explain one's approach and considerations.
110-
- **Verification**: Identify various scenarios to test the code against, including edge cases. Be able to diagnose and fix any issues that arise.
107+
- **Problem solving**: Use a systematic and logical approach to understanding and addressing a problem. Break down the problem into smaller independent problems. Evaluate different approaches and their tradeoffs
108+
- **Technical competence**: Ability to translate solutions into working code and demonstrating a strong understanding of the language being used
109+
- **Communication**: Ask questions to clarify details and clearly explain one's approach and considerations
110+
- **Verification**: Identify various scenarios to test the code against, including edge cases. Be able to diagnose and fix any issues that arise
111111

112112
## Useful tips
113113

114-
- **Wishful thinking**. JavaScript's standard library doesn't have some useful data structures and algorithms like queue, heap, binary search, which can make your life easier during JavaScript coding interviews. However, you can ask the interviewer if you can pretend such a data structure/algorithm exists and use it directly in your solution without implementing it.
115-
- **Pure functions**. Aim to write pure functions which have the benefit of reusability and modularity, aka functions which don't rely on state outside of the function and doesn't cause side effects.
116-
- **Choose data structures wisely.** Pay attention to your choice of data structures and be aware of the time complexities of the code. Be familiar with the time/space complexities of the basic JavaScript Array, Object, Set, Map operations should you want to use them in your solution. Some of these time/space complexities differ across languages. Don't write code that runs in O(n<sup>2</sup>) if it can accomplished in O(n) runtime with the use of hash maps.
117-
- **Recursion edge cases**.
118-
- If you have identified that solving the question requires recursion, ask about the input size and how to handle the case of recursion stack overflow. Usually you won't have to handle it but raising this issue is a good signal.
119-
- Nested deep data structures can have recursive references to itself, which makes certain operations like serialization much trickier. Ask the interviewer if you have to handle such cases. Usually you won't have to handle it but raising this issue is a good signal.
114+
- **Wishful thinking**: JavaScript's standard library doesn't have some useful data structures and algorithms like queue, heap, binary search, which can make your life easier during JavaScript coding interviews. However, you can ask the interviewer if you can pretend such a data structure/algorithm exists and use it directly in your solution without implementing it.
115+
- **Pure functions**: Aim to write pure functions which have the benefit of reusability and modularity, aka functions which don't rely on state outside of the function and doesn't cause side effects.
116+
- **Choose data structures wisely**: Pay attention to your choice of data structures and be aware of the time complexities of the code. Be familiar with the time/space complexities of the basic JavaScript Array, Object, Set, Map operations should you want to use them in your solution. Some of these time/space complexities differ across languages. Don't write code that runs in O(n<sup>2</sup>) if it can accomplished in O(n) runtime with the use of hash maps.
117+
- **Recursion edge cases**:
118+
- **Clarifying input size**: If you have identified that solving the question requires recursion, ask about the input size and how to handle the case of recursion stack overflow. Usually you won't have to handle it but raising this issue demonstrates thoughtfulness.
119+
- **Cyclic structures**: Nested deep data structures can have recursive references to itself, which makes certain operations like serialization and traversal more tricky. Ask the interviewer if you have to handle such cases. Usually you won't have to handle it but raising this issue demonstrates thoughtfulness.
120120

121121
## Practice questions
122122

123-
Blind 75 is a famous and concise list of algorithm questions by Yangshun Tay. You can practice the [Blind 75 question list on GreatFrontEnd](/interviews/blind75).
123+
Blind 75 is a famous and concise list of algorithm questions curated by [Yangshun Tay](https://www.linkedin.com/in/yangshun/). You can practice the [Blind 75 question list on GreatFrontEnd](/interviews/blind75).
124124

125125
GreatFrontEnd also provides some [general practice questions for Data Structures and Algorithms](/questions/formats/algo-coding) where you can practice implementing common data structures ([Stack](/questions/algo/stack), [Queue](/questions/algo/queue)) and algorithms ([Binary Search](/questions/algo/binary-search), [Merge Sort](/questions/algo/merge-sort)), etc in JavaScript.

0 commit comments

Comments
 (0)