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 2e77826

Browse files
chore: placeholder for exercises
1 parent 06d75d8 commit 2e77826

File tree

1 file changed

+81
-9
lines changed

1 file changed

+81
-9
lines changed

‎book/content/part04/divide-and-conquer.asc

Lines changed: 81 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ graph G {
6666
"fib(2)**" -- { "fib(1)****", "fib(0)**" }
6767
6868
// red colors
69-
"fib(0)*" [color="#FF5252"];
70-
"fib(0)**" [color="#FF5252"];
71-
"fib(1)*" [color="#FF5252"];
72-
"fib(1)**" [color="#FF5252"];
73-
"fib(1)***" [color="#FF5252"];
74-
"fib(1)****" [color="#FF5252"];
75-
"fib(2)*" [color="#FF5252"];
76-
"fib(2)**" [color="#FF5252"];
77-
"fib(3)*" [color="#FF5252"];
69+
"fib(0)*" [color="#FF5252" label="fib(0)"];
70+
"fib(0)**" [color="#FF5252" label="fib(0)"];
71+
"fib(1)*" [color="#FF5252" label="fib(1)"];
72+
"fib(1)**" [color="#FF5252" label="fib(1)"];
73+
"fib(1)***" [color="#FF5252" label="fib(1)"];
74+
"fib(1)****" [color="#FF5252" label="fib(1)"];
75+
"fib(2)*" [color="#FF5252" label="fib(2)"];
76+
"fib(2)**" [color="#FF5252" label="fib(2)"];
77+
"fib(3)*" [color="#FF5252" label="fib(3)"];
7878
}
7979
....
8080

@@ -94,3 +94,75 @@ Those who cannot remember the past are condemned to repeat it.
9494
For these cases when subproblems repeat themselves, we can optimize them using <<Dynamic Programming, dynamic programming>>. Let's do that in the next section.
9595

9696

97+
98+
99+
100+
101+
102+
// But before doing dynamic programming. Let's do this divide and conquer exercises.
103+
104+
// ==== Practice Questions
105+
// (((Interview Questions, Divide and Conquer)))
106+
107+
108+
109+
110+
111+
// // https://leetcode.com/problems/merge-k-sorted-lists/
112+
113+
// // tag::divide-and-conquer-q-FILENAME[]
114+
// ===== TITLE
115+
116+
// *DC-1*) _._
117+
118+
// // end::divide-and-conquer-q-FILENAME[]
119+
120+
// // _Seen in interviews at: X._
121+
122+
// *Starter code*:
123+
124+
// [source, javascript]
125+
// ----
126+
// include::../../interview-questions/FILENAME.js[tags=description;placeholder]
127+
// ----
128+
129+
// *Examples*:
130+
131+
// [source, javascript]
132+
// ----
133+
// FN([]); // 3 (EXPLANATION)
134+
// ----
135+
136+
137+
// _Solution: <<divide-and-conquer-q-FILENAME>>_
138+
139+
140+
141+
142+
// // https://leetcode.com/problems/search-a-2d-matrix-ii/
143+
144+
// // tag::divide-and-conquer-q-FILENAME[]
145+
// ===== TITLE
146+
147+
// *DC-2*) _._
148+
149+
// // end::divide-and-conquer-q-FILENAME[]
150+
151+
// // _Seen in interviews at: X._
152+
153+
// *Starter code*:
154+
155+
// [source, javascript]
156+
// ----
157+
// include::../../interview-questions/FILENAME.js[tags=description;placeholder]
158+
// ----
159+
160+
// *Examples*:
161+
162+
// [source, javascript]
163+
// ----
164+
// FN([]); // 3 (EXPLANATION)
165+
// ----
166+
167+
168+
// _Solution: <<divide-and-conquer-q-FILENAME>>_

0 commit comments

Comments
(0)

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