Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b3167f9

Browse files
feat(book): show companies asked questions
1 parent 6c39aae commit b3167f9

16 files changed

+31
-29
lines changed

‎book/content/part01/big-o-examples.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Before we dive in, here’s a plot with all of them.
2323

2424
.CPU operations vs. Algorithm runtime as the input size grows
2525
// image::image5.png[CPU time needed vs. Algorithm runtime as the input size increases]
26-
image::big-o-running-time-complexity.png[CPU time needed vs. Algorithm runtime as the input size increases]
26+
image::time-complexity-manual.png[{half-size}]
2727

2828
The above chart shows how the algorithm's running time is related to the CPU's work. As you can see, O(1) and O(log n) is very scalable. However, O(n^2^) and worst can convert your CPU into a furnace 🔥 for massive inputs.
2929

‎book/content/part02/array.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ maxSubArray([-3, 4,-1, 2, 1, -5]); // 6 (sum [4,-1, 2, 1])
522522
maxSubArray([-2, 1, -3, 4, -1, 3, 1]); // 7 (sum [4,-1, 3, 1])
523523
----
524524

525-
// _Seen in interviews at: Amazon, Apple, Google, Microsoft, Facebook_
525+
_Common in interviews at: Amazon, Apple, Google, Microsoft, Facebook_
526526
// end::array-q-max-subarray[]
527527

528528
[source, javascript]
@@ -548,7 +548,7 @@ maxProfit([3, 2, 1]) // 2 (no buys)
548548
maxProfit([5, 10, 5, 10]) // 5 (buying at 5 and selling at 10)
549549
----
550550

551-
// _Seen in interviews at: Amazon, Facebook, Bloomberg_
551+
_Common in interviews at: Amazon, Facebook, Bloomberg_
552552
// end::array-q-buy-sell-stock[]
553553

554554
[source, javascript]

‎book/content/part02/hash-map.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ Something that might look unnecessary is the `Math.max` when updating the `lo` p
627627

628628
// end::hashmap-q-two-sum[]
629629

630-
// _Seen in interviews at: Amazon, Google, Apple._
630+
_Common in interviews at: Amazon, Google, Apple._
631631

632632
Examples:
633633

@@ -656,7 +656,7 @@ _Solution: <<hashmap-q-two-sum>>_
656656

657657
// end::hashmap-q-subarray-sum-equals-k[]
658658

659-
// _Seen in interviews at: Facebook, Google, Amazon_
659+
_Common in interviews at: Facebook, Google, Amazon_
660660

661661
Examples:
662662

‎book/content/part02/hash-set.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Find the most common word that is not on the banned list.
129129
You might need to sanitize the text and strip out punctuation `?!,'.`_
130130
// end::set-q-most-common-word[]
131131

132-
// _Seen in interviews at: Amazon._
132+
_Common in interviews at: Amazon._
133133

134134
Examples:
135135

@@ -173,7 +173,7 @@ _Solution: <<set-q-most-common-word>>_
173173

174174
// end::set-q-longest-substring-without-repeating-characters[]
175175

176-
// _Seen in interviews at: Amazon, Facebook, Bloomberg._
176+
_Common in interviews at: Amazon, Facebook, Bloomberg._
177177

178178
Examples:
179179

‎book/content/part02/linked-list.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ mergeTwoLists(2->3->4, 1->2); // 1->2->2->3->4
584584
mergeTwoLists(2->3->4,null); // 2->3->4
585585
----
586586

587-
// _Seen in interviews at: Amazon, Adobe, Microsoft, Google_
587+
_Common in interviews at: Amazon, Adobe, Microsoft, Google_
588588
// end::linkedlist-q-merge-lists[]
589589

590590
[source, javascript]
@@ -612,7 +612,7 @@ hasSameData(hello, hel->lo); // true
612612
hasSameData(he->ll->o, h->i); // false
613613
----
614614

615-
// _Seen in interviews at: Facebook_
615+
_Common in interviews at: Facebook_
616616
// end::linkedlist-q-linkedlist-same-data[]
617617

618618
[source, javascript]

‎book/content/part02/queue.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ counter.request(3100); // 1 (last requests was 100 ms ago, > 10ms, so doesn't co
103103
counter.request(3105); // 2 (last requests was 5 ms ago, <= 10ms, so it counts)
104104
----
105105

106-
// _Seen in interviews at: Google, Bloomberg, Yandex_
106+
_Common in interviews at: Google, Bloomberg, Yandex_
107107
// end::queue-q-recent-counter[]
108108

109109

@@ -135,7 +135,7 @@ expect(snakeGame.move('L')).toEqual(2); // 2 (ate food2)
135135
expect(snakeGame.move('U')).toEqual(-1); // -1 (hit wall)
136136
----
137137

138-
// _Seen in interviews at: Amazon, Bloomberg, Apple_
138+
_Common in interviews at: Amazon, Bloomberg, Apple_
139139
// end::queue-q-design-snake-game[]
140140

141141
[source, javascript]

‎book/content/part02/stack.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ isParenthesesValid('[{]}'); // false (brakets are not closed in the right order)
106106
isParenthesesValid('([{)}]'); // false (closing is out of order)
107107
----
108108

109-
// _Seen in interviews at: Amazon, Bloomberg, Facebook, Citadel_
109+
_Common in interviews at: Amazon, Bloomberg, Facebook, Citadel_
110110
// end::stack-q-valid-parentheses[]
111111

112112
[source, javascript]
@@ -135,7 +135,7 @@ dailyTemperatures([30, 28, 50, 40, 30]); // [2 (to 50), 1 (to 28), 0, 0, 0]
135135
dailyTemperatures([73, 69, 72, 76, 73, 100]); // [3, 1, 1, 0, 1, 100]
136136
----
137137

138-
// _Seen in interviews at: Amazon, Adobe, Cisco_
138+
_Common in interviews at: Amazon, Adobe, Cisco_
139139
// end::stack-q-daily-temperatures[]
140140

141141
[source, javascript]

‎book/content/part03/binary-search-tree-traversal.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Post-order traverval will return `3, 4, 5, 15, 40, 30, 10`.
105105

106106
// end::binary-tree-q-diameter-of-binary-tree[]
107107

108-
// _Seen in interviews at: Facebook, Amazon, Google_
108+
_Common in interviews at: Facebook, Amazon, Google_
109109

110110
// Example 1:
111111
// [graphviz, tree-diameter-example-1, png]
@@ -203,7 +203,7 @@ _Solution: <<binary-tree-q-diameter-of-binary-tree>>_
203203

204204
// end::binary-tree-q-binary-tree-right-side-view[]
205205

206-
// _Seen in interviews at: Facebook, Amazon, ByteDance (TikTok)._
206+
_Common in interviews at: Facebook, Amazon, ByteDance (TikTok)._
207207

208208
Examples:
209209

‎book/content/part03/graph-search.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ NOTE: Every tree is a graph, but not every graph is a tree. Only acyclic directe
102102

103103
// end::graph-q-course-schedule[]
104104

105-
// _Seen in interviews at: Amazon, Facebook, Bytedance (TikTok)._
105+
_Common in interviews at: Amazon, Facebook, Bytedance (TikTok)._
106106

107107

108108
*Starter code*:
@@ -155,7 +155,7 @@ _Solution: <<graph-q-course-schedule>>_
155155

156156
// end::graph-q-critical-connections-in-a-network[]
157157

158-
// _Seen in interviews at: Amazon, Google._
158+
_Common in interviews at: Amazon, Google._
159159

160160
Examples:
161161

‎book/content/part04/algorithmic-toolbox.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ TIP: TL;DR: Don't start coding right away. First, solve the problem, then write
2424
. *Test* your algorithm idea with multiple examples
2525
. *Optimize* the solution –Only optimize when you have something working. Don't try to do both at the same time!
2626
.. Can you trade-off space for speed? Use a <<hashmap-chap>> to speed up results!
27-
.. Do you have a bunch of recursive and overlapping problems? Try <<Dynamic Programming>>.
27+
.. Do you have a bunch of recursive and overlapping problems? Try <<dynamic-programming-chap>>.
2828
.. Re-read requirements and see if you can take advantage of anything. E.g. is the array sorted?
2929
. *Write Code*, yes, now you can code.
3030
.. Modularize your code with functions (don't do it all in one giant function, please 🙏)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /