Skip to content

Commit 86b9d1c

Browse files
committedJun 23, 2019
epub validation passed!!!

14 files changed

+415
-17
lines changed
 

‎book-pro/A-time-complexity-cheatsheet.asc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ include::content/part01/algorithms-analysis.asc[tag=table]
1212

1313
=== Linear Data Structures
1414

15-
// <<part02-linear-data-structures#linear-data-structures-table>>
16-
1715
include::content/part02/array-vs-list-vs-queue-vs-stack.asc[tag=table]
1816

1917
=== Trees and Maps Data Structures

‎book-pro/Find-the-largest-sum.png

15.9 KB
Loading

‎book-pro/Find-the-largest-sum.svg

Lines changed: 86 additions & 0 deletions
Loading
Loading
Lines changed: 74 additions & 0 deletions
Loading

‎book-pro/Words-Permutations.png

46.2 KB
Loading

‎book-pro/Words-Permutations.svg

Lines changed: 239 additions & 0 deletions
Loading

‎book-pro/config/Rakefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ namespace :book do
2626
# require_pdf = ''
2727

2828

29-
puts "\r\n>> Converting to HTML..."
30-
cmd = "asciidoctor #{require} #{params} #{input} 2>&1"
31-
puts cmd
32-
puts `#{cmd}`
33-
puts "\t-- HTML output at progit.html"
29+
# puts "\r\n>> Converting to HTML..."
30+
# cmd = "asciidoctor #{require} #{params} #{input} 2>&1"
31+
# puts cmd
32+
# puts `#{cmd}`
33+
# puts "\t-- HTML output at progit.html"
3434

3535
# puts "\r\nConverting to PDF... (this one takes a while)"
3636
# cmd = "bundle exec asciidoctor-pdf #{require} #{require_pdf} #{params} #{input} 2>&1"
@@ -39,16 +39,18 @@ namespace :book do
3939
# puts " -- PDF output at progit.pdf"
4040

4141
puts "\r\n>> Converting to EPub..."
42-
# cmd = "bundle exec asciidoctor-epub3 #{require} -a ebook-validate #{params} #{input} 2>&1"
43-
cmd = "bundle exec asciidoctor-epub3 #{require} #{params} #{input} 2>&1"
42+
cmd = "bundle exec asciidoctor-epub3 #{require} -a ebook-validate #{params} #{input} 2>&1"
43+
# cmd = "bundle exec asciidoctor-epub3 #{require} #{params} #{input} 2>&1"
4444
puts cmd
4545
puts `#{cmd}`
4646
puts "\t-- Epub output at progit.epub"
4747

4848
# puts "\r\nConverting to Mobi (kf8)..."
49+
# cmd = "bundle exec asciidoctor-epub3 #{require} #{params} #{input} 2>&1"
50+
# puts cmd
51+
# puts `#{cmd}`
4952
# puts `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 #{input} 2>&1`
5053
# puts " -- Mobi output at progit.mobi"
51-
5254
end
5355
end
5456
end

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ If there’s no match, we return `undefined` then. The runtime is _O(n)_. As you
114114

115115
Similar to the array, with a linked list you can add elements at the beginning, end or anywhere in the middle of the list. So, let's implement each case.
116116

117+
[[linked-list-inserting-beginning]]
117118
===== Inserting elements at the beginning of the list
118119

119120
We are going to use the `Node` class to create a new element and stick it at the beginning of the list as shown below.
@@ -124,8 +125,6 @@ image:images/image23.png[image,width=498,height=217]
124125

125126
To insert at the beginning, we create a new node with the next reference to the current first node. Then we make first the new node. In code, it would look something like this:
126127

127-
[[linked-list-inserting-beginning]]
128-
129128
.Add item to the beginning of a Linked List
130129
[source, javascript]
131130
----

‎book-pro/content/part04/backtracking.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ As you can see, we iterate through each element and swap with the following lett
7575

7676
In the following tree, you can visualize how the backtracking algorithm is swapping the letters. We are taking the `art` as an example.
7777

78-
[graphviz, Words Permutations, svg]
78+
[graphviz, Words-Permutations, png]
7979
....
8080
digraph g {
8181
node [shape = record,height=.1];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The implementation above does the job, but what's the runtime?
4949
For that, let's take a look at the job performed calculating the `fib(5)` number. Since `fib(5) = fib(4) + fib(3)`, we need to find the answer for `fib(4)` and `fib(3)`. We do that recursively until we reach the base cases of `fib(1)` and `fib(0)`. If we represent the calls in a tree, we would have the following:
5050

5151
// http://bit.ly/2UmwzZV
52-
[graphviz, Recursive Fibonacci call tree, png]
52+
[graphviz, recursive-fibonacci-call-tree, png]
5353
....
5454
graph G {
5555
"fib(5)" -- { "fib(4)", "fib(3)" }

‎book-pro/content/part04/dynamic-programming.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ include::{codedir}/algorithms/fibanacci-dynamic-programming.js[tag=snippet,inden
4040

4141
This implementation checks if we already calculated the value, if so it will save it for later use.
4242

43-
[graphviz, Recursive Fibonacci call tree with dp, svg]
43+
[graphviz, Recursive-Fibonacci-call-tree-with-dp, png]
4444
....
4545
graph G {
4646
"fib(5)" -- { "fib(4)" }

‎book-pro/content/part04/greedy-algorithms.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ They are quick but not always lead to most optimum results since it might not ta
77

88
An excellent example of a greedy algorithm that doesn't work well is finding the largest sum on a tree.
99

10-
[graphviz, Find the largest sum, svg]
10+
[graphviz, Find-the-largest-sum, png]
1111
....
1212
graph G {
1313
5 -- 3 [color="#B8E986", penwidth=2]

‎book/chapters/dynamic-programming-fibonacci.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ include::{codedir}/algorithms/fibanacci-dynamic-programming.js[tag=snippet,inden
1717

1818
This implementation checks if we already calculated the value, if so it will save it for later use.
1919

20-
[graphviz, Recursive Fibonacci call tree with dp, svg]
20+
[graphviz, Recursive Fibonacci call tree with dp, png]
2121
....
2222
graph G {
2323
"fib(5)" -- { "fib(4)" }

0 commit comments

Comments
 (0)
Please sign in to comment.