Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third edition #40

Merged
merged 107 commits into from
Mar 12, 2018
Merged
Changes from 1 commit
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
3e68460
init third edition
loiane Sep 7, 2017
daac43e
config js and ts
loiane Sep 7, 2017
db4fdef
eslint
loiane Sep 7, 2017
68badcd
project setup
loiane Sep 7, 2017
809400a
tslint
loiane Sep 7, 2017
29e3a77
project setup
loiane Sep 7, 2017
2598f52
travis
loiane Sep 7, 2017
1de57bc
added codecov
loiane Sep 7, 2017
f0253a7
added ts
loiane Sep 7, 2017
de901ab
codecov
loiane Sep 7, 2017
2ccfeef
added chapter 01
loiane Sep 8, 2017
b0c63fa
updated codecov
loiane Sep 8, 2017
3ce70a5
added chapter 02
loiane Sep 8, 2017
cfb49b3
added stack chapter 03
loiane Sep 9, 2017
aa73a46
fixed js test cmd
loiane Sep 9, 2017
9148fa6
added type to Stack
loiane Sep 9, 2017
0a7a916
added ts and js code coverage
loiane Sep 9, 2017
88b635c
codecov
loiane Sep 9, 2017
1048abe
added babel-eslint
loiane Sep 16, 2017
de698ca
chapter 1: updated code comments
loiane Sep 16, 2017
6ba98db
renamed html to examples
loiane Sep 16, 2017
d9d90c7
moved html and js to different folders
loiane Sep 16, 2017
f9ed7d8
renamed html to examples
loiane Sep 16, 2017
29a3595
chapter 01: ES2015 (ES6) examples
loiane Sep 16, 2017
9000633
es2015 modules
loiane Sep 17, 2017
c5e96e6
EcmaScript 2016 (ES7): Exponentiation operator
loiane Sep 17, 2017
ccb2f76
test chapter 3
loiane Sep 17, 2017
838208e
fixed path
loiane Sep 17, 2017
d5aa641
es2015 setup
loiane Sep 17, 2017
8b5c140
fixed tsconfig
loiane Sep 17, 2017
445e382
added vs code tasks ofr debug
loiane Sep 17, 2017
25ba9c8
added main examples page
loiane Sep 17, 2017
735b32b
chapter 03
loiane Sep 17, 2017
2d909b6
removed unecessary return
loiane Sep 17, 2017
b2f6e3a
changed var name
loiane Sep 17, 2017
a81b579
chapter 01: ES2015 modules
loiane Sep 18, 2017
e50ce8a
chapter 01: intro TS
loiane Sep 18, 2017
3f39545
Vanilla JS: /* eslint-disable */
loiane Sep 18, 2017
c05109f
chapter 01: typescript introduction
loiane Sep 18, 2017
e1f84e8
added // @ts-check
loiane Sep 18, 2017
7371b21
chapter 01 examples
loiane Sep 18, 2017
f7110fd
fixed order bo examples
loiane Sep 18, 2017
3d897fc
removed file
loiane Sep 18, 2017
579a270
updated readme
loiane Sep 18, 2017
2c3d486
fixed go script
loiane Sep 22, 2017
6a4eb60
chapter 02 - arrays
loiane Sep 23, 2017
8cf2152
chapter 02 - arrays
loiane Sep 24, 2017
5d392e6
chapter 03: [Stacks]
loiane Sep 30, 2017
646f744
chapter 03: [Stacks]
loiane Sep 30, 2017
95fe4fa
chapter 03: [Stacks]
loiane Sep 30, 2017
ea30d2c
chapter 03: [Stacks]
loiane Oct 1, 2017
5eabb7b
chapter 04: [Queues and Deques]
loiane Oct 8, 2017
2414e5f
chapter 04: [Queues and Deques]
loiane Oct 8, 2017
bacfd56
chapter 05: [LinkedLists]
loiane Oct 14, 2017
c922b60
chapter 05: [LinkedLists]
loiane Oct 15, 2017
1a4f18e
chapter 05: [LinkedLists]
loiane Oct 15, 2017
17cfa43
chapter 05: [LinkedLists]
loiane Oct 15, 2017
52cb8a2
capter 05: [LinkedLists]
loiane Oct 15, 2017
438f96e
chapter 03: [Stacks]
loiane Oct 15, 2017
77219d3
chapter 05: [LinkedLists]
loiane Oct 15, 2017
1dd6a4c
chapter 05: [LinkedLists]
loiane Oct 15, 2017
b099b8c
chapter 05: [LinkedLists]
loiane Oct 15, 2017
1d40fd4
chapter 05: [LinkedLists]
loiane Oct 15, 2017
3dcc88e
chapter 05: [LinkedLists]
loiane Oct 15, 2017
806f16a
chapter 05: [LinkedLists]
loiane Oct 22, 2017
98c96f5
added example from #31. Closes #31
loiane Oct 22, 2017
b4b1780
added firebase deploy for examples
loiane Oct 22, 2017
f62d2cf
added firebase deploy for examples
loiane Oct 22, 2017
4ee46b1
added TS support to ES2017
loiane Oct 22, 2017
5961185
chapter 06: [Sets]
loiane Oct 22, 2017
79abb9a
updated package versions
loiane Oct 22, 2017
8fc1643
chapter 03: [Stacks]
loiane Oct 22, 2017
4201d4b
chapter 06: [Sets]
loiane Oct 22, 2017
851e8bb
chapter 03: [Stacks]
loiane Oct 22, 2017
44c54ca
chapter 06: [Sets]
loiane Oct 22, 2017
342c568
chapter 06: [Sets]
loiane Oct 22, 2017
9c22abb
added bithound
loiane Oct 23, 2017
01a6b08
added changelog file
loiane Oct 23, 2017
6ade16e
fixed bithoundrc
loiane Oct 23, 2017
188bbc2
added dev script without coverage table
loiane Oct 28, 2017
5ec1287
chapter 07: [Dictionaries and Hashes]
loiane Oct 29, 2017
f01fe09
chapter 07: [Dictionaries and Hashes]
loiane Oct 31, 2017
b337fe8
chapter 07: [Dictionaries and Hashes]
loiane Nov 2, 2017
b6dfa0f
chapter 08: [Recursion]
loiane Nov 18, 2017
e18ebb4
chapter 09: [Trees]
loiane Nov 25, 2017
aa0bb50
chapter 10: [Heap]
loiane Dec 16, 2017
1829d34
chapter 10: [Heap]
loiane Dec 21, 2017
354cf53
chapter 11: [Graphs]
loiane Dec 23, 2017
2ca9447
moving heap-sort to algorithms/sorting
loiane Dec 23, 2017
d916fb1
moved heap-sort to algorithms/sorting
loiane Dec 23, 2017
9607ab5
chapter 11: [Graphs]
loiane Dec 25, 2017
56a4153
Sorting and Searching Algorithms
loiane Dec 26, 2017
e6c7279
[Sorting and Searching Algorithms]
loiane Dec 27, 2017
6b5cc0c
[Sorting and Searching Algorithms]
loiane Dec 30, 2017
b68ac1f
chapter 12: [Sorting and Searching Algorithms]
loiane Jan 21, 2018
5eca6f2
[Sorting and Searching Algorithms]
loiane Jan 26, 2018
c77c903
[Algorithm Design and Techniques]
loiane Jan 26, 2018
ae5abc0
[Algorithm Design and Techniques]
loiane Feb 4, 2018
b617530
updated readme
loiane Feb 4, 2018
72d0a47
[Algorithm Design and Techniques]
loiane Feb 4, 2018
f92455a
[Algorithm Design and Techniques]
loiane Feb 4, 2018
f876dda
[Algorithm Design and Techniques]
loiane Feb 4, 2018
964eb43
[Algorithm Design and Techniques]
loiane Feb 4, 2018
ab9a49e
[Algorithm Design and Techniques]
loiane Feb 12, 2018
a180e8a
[String and Math Algorithms]
loiane Mar 12, 2018
ef79e85
[String and Math Algorithms]
loiane Mar 12, 2018
d4c49da
Merge branch 'master' into third-edition
loiane Mar 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Algorithm Design and Techniques]
loiane committed Feb 4, 2018
commit f876ddaa0fddee3fbaadd13c9d8a8d158532406b
6 changes: 2 additions & 4 deletions src/ts/algorithms/dynamic-programing/knapsack.ts
Original file line number Diff line number Diff line change
@@ -22,17 +22,15 @@ export function knapSack(capacity: number, weights: number[], values: number[],
}

// extra algorithm to find the items that are part of the solution
findValues(n, capacity, kS, values, weights);
findValues(n, capacity, kS);

return kS[n][capacity];
}

function findValues(
n: number,
capacity: number,
kS: Array<Array<number>>,
weights: number[],
values: number[]
kS: Array<Array<number>>
) {
let i = n;
let k = capacity;
2 changes: 1 addition & 1 deletion src/ts/algorithms/dynamic-programing/min-coin-change.ts
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ export function minCoinChange(coins: number[], amount: number) {
(newMin.length || !newAmount)
) {
min = [coin].concat(newMin);
console.log('new Min ' + min + ' for ' + amount);
// console.log('new Min ' + min + ' for ' + amount);
}
}
return (cache[amount] = min);