Skip to content

sync with main #228

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

Merged
merged 87 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
0f4dbab
Merge pull request #120 from loiane/third-edition
loiane Mar 15, 2019
b7170d1
Merge pull request #121 from loiane/third-edition
loiane Mar 15, 2019
817db9e
Merge pull request #122 from loiane/third-edition
loiane Mar 15, 2019
021ebd7
Merge pull request #123 from loiane/third-edition
loiane Mar 15, 2019
c843462
chore(package): update webpack-cli to version 3.3.0
greenkeeper[bot] Mar 16, 2019
706f36d
chore(package): update lockfile package-lock.json
greenkeeper[bot] Mar 16, 2019
c1c374f
Merge pull request #124 from loiane/greenkeeper/webpack-cli-3.3.0
loiane Mar 16, 2019
f64d9d8
Update README.md
ayomel Apr 1, 2019
0e0ba57
grammar correction
shockyng May 8, 2019
01e35d4
Bump mixin-deep from 1.3.1 to 1.3.2
dependabot[bot] Oct 29, 2019
3236269
Bump acorn from 6.1.1 to 6.4.1
dependabot[bot] Mar 13, 2020
0a606fd
Bump https-proxy-agent from 2.2.1 to 2.2.4
dependabot[bot] Apr 16, 2020
ae6c563
Bump lodash from 4.17.10 to 4.17.19
dependabot[bot] Jul 16, 2020
2acc2db
Merge pull request #134 from LuanHenriqueR8/master
loiane Jul 19, 2020
1bce038
Merge pull request #156 from loiane/dependabot/npm_and_yarn/lodash-4.…
loiane Jul 19, 2020
10df6bc
Merge pull request #155 from loiane/dependabot/npm_and_yarn/https-pro…
loiane Jul 19, 2020
a23fcdb
Bump eslint-utils from 1.3.1 to 1.4.3
dependabot[bot] Jul 19, 2020
25be7be
Bump codecov from 3.2.0 to 3.6.5
dependabot[bot] Jul 19, 2020
d326a23
Bump handlebars from 4.0.10 to 4.7.6
dependabot[bot] Jul 19, 2020
b7656b8
Merge branch 'master' into patch-1
loiane Jul 19, 2020
0e2c40f
Merge pull request #126 from mhunter11/patch-1
loiane Jul 19, 2020
6021ccd
Merge pull request #149 from loiane/dependabot/npm_and_yarn/mixin-dee…
loiane Jul 19, 2020
98a6f52
Merge pull request #153 from loiane/dependabot/npm_and_yarn/acorn-6.4.1
loiane Jul 19, 2020
169f5de
Merge pull request #158 from loiane/dependabot/npm_and_yarn/handlebar…
loiane Jul 19, 2020
a3e72d8
Merge pull request #157 from loiane/dependabot/npm_and_yarn/eslint-ut…
loiane Jul 19, 2020
6bda9e6
Merge pull request #152 from loiane/dependabot/npm_and_yarn/codecov-3…
loiane Jul 19, 2020
a0d4200
Bump fstream from 1.0.11 to 1.0.12
dependabot[bot] Jul 19, 2020
22eb236
Bump js-yaml from 3.10.0 to 3.13.1
dependabot[bot] Jul 19, 2020
39ac473
Bump codecov from 3.6.5 to 3.7.1
dependabot[bot] Jul 21, 2020
ebe7e38
Bump elliptic from 6.4.1 to 6.5.3
dependabot[bot] Jul 30, 2020
4bedf17
Merge pull request #160 from loiane/dependabot/npm_and_yarn/fstream-1…
loiane Jul 30, 2020
d077ff4
Merge pull request #161 from loiane/dependabot/npm_and_yarn/js-yaml-3…
loiane Jul 30, 2020
a7cd4a3
Merge pull request #162 from loiane/dependabot/npm_and_yarn/codecov-3…
loiane Jul 30, 2020
8151ba0
Merge pull request #163 from loiane/dependabot/npm_and_yarn/elliptic-…
loiane Jul 30, 2020
ec96129
restored chapter 10 examples
Nov 2, 2020
814a24d
updated http-server
Nov 2, 2020
f979034
updated yargs
Nov 2, 2020
99bca3b
Bump ini from 1.3.5 to 1.3.7
dependabot[bot] Dec 10, 2020
08b2f4a
Merge pull request #166 from loiane/dependabot/npm_and_yarn/ini-1.3.7
loiane Jan 16, 2021
6f1d371
Bump ssri from 6.0.1 to 6.0.2
dependabot[bot] Apr 19, 2021
2b8810c
Bump handlebars from 4.0.11 to 4.7.7
dependabot[bot] May 6, 2021
f66914c
Bump lodash from 4.17.10 to 4.17.21
dependabot[bot] May 7, 2021
b2dffee
Bump hosted-git-info from 2.6.0 to 2.8.9
dependabot[bot] May 9, 2021
fecf5ca
Merge pull request #174 from loiane/dependabot/npm_and_yarn/hosted-gi…
loiane May 24, 2021
dfcc358
Merge pull request #173 from loiane/dependabot/npm_and_yarn/lodash-4.…
loiane May 24, 2021
638e58f
Merge pull request #172 from loiane/dependabot/npm_and_yarn/handlebar…
loiane May 24, 2021
c4ea585
Merge pull request #171 from loiane/dependabot/npm_and_yarn/ssri-6.0.2
loiane May 24, 2021
21bf21a
Merge pull request #1 from loiane/main
rookie-mr Aug 4, 2021
db35403
Merge pull request #180 from rookie-mr/main
loiane Sep 25, 2021
57d29f6
Adding gale-shapley algorithm
anthonycampbell Sep 26, 2021
3828b54
Merge pull request #181 from anthonycampbell/gale_shapley
loiane Oct 1, 2021
4fb2b45
fix: CircularLinkedList insert function
jeff-zhenz May 11, 2022
c0bd451
Merge pull request #190 from Jeffzholy/fix/chapter-6-CircularLinkedList
loiane May 11, 2022
91887bc
improvements: isSubsetOf function of Set
jeff-zhenz May 11, 2022
8a39b5c
Merge pull request #191 from Jeffzholy/improvements/chapter-7-Set
loiane May 12, 2022
f0fa8e5
fix: AVL tree insertNode and removeNode functions
jeff-zhenz May 17, 2022
73b3db5
Merge pull request #193 from Jeffzholy/fix/chapter-10-AVLTree
loiane May 17, 2022
d079c26
BinarySearchMCCTesting
nmtuan1612 May 22, 2022
39a439d
Change URL path where application is running to debug
VictorAugDB May 25, 2022
5c21cea
run http-server without cache
VictorAugDB May 26, 2022
0d61cb3
Merge pull request #197 from VictorAugDB/remove-cache-from-http-server
loiane May 30, 2022
19f1151
Merge pull request #195 from VictorAugDB/fix-debug
loiane May 30, 2022
2904130
Bump node-fetch from 2.6.1 to 2.6.7
dependabot[bot] May 30, 2022
721c668
Merge pull request #194 from nmtuan1612/TestBinarySearch
loiane May 30, 2022
7d33c7c
Merge pull request #198 from loiane/dependabot/npm_and_yarn/node-fetc…
loiane May 30, 2022
a9ba9d8
fix: hash-table-linear-probing get function
Yamiqu Aug 3, 2022
0da564f
fix: remove useless argument
jarvislin94 Aug 20, 2022
8395876
Change line endings to LF in github
SatsCzar Dec 4, 2022
29031f0
Specified the value of 'false' and 'age' within the comment
fernanda-freitas Apr 10, 2023
eef66c9
fix & optimize gcd function
os-moussao Dec 9, 2023
adaaaf4
update unit tests for gcd function
os-moussao Dec 9, 2023
25596e4
Merge pull request #221 from os-moussao/fix-optimize/gcd
loiane Dec 20, 2023
f241a56
Merge pull request #219 from fernanda-freitas/fix_truthyfalsy_comment…
loiane Dec 20, 2023
dbac861
Merge pull request #213 from SatsCzar/patch-1
loiane Dec 20, 2023
60e5269
Bump follow-redirects from 1.13.0 to 1.15.4
dependabot[bot] Jan 9, 2024
b1eb1c0
Merge pull request #222 from loiane/dependabot/npm_and_yarn/follow-re…
loiane Feb 27, 2024
cc1ce5d
Bump browserify-sign from 4.2.1 to 4.2.2
dependabot[bot] Feb 27, 2024
0842127
Bump @babel/traverse from 7.12.1 to 7.23.9
dependabot[bot] Feb 27, 2024
dcf995f
Bump async from 2.6.3 to 2.6.4
dependabot[bot] Feb 27, 2024
0d56427
Merge pull request #207 from Yamiqu/main
loiane Mar 12, 2024
9fb02d3
Merge pull request #210 from JackZong/fix/remove_useless_argument
loiane Mar 12, 2024
d31faae
Merge pull request #223 from loiane/dependabot/npm_and_yarn/browserif…
loiane Mar 12, 2024
a57317d
Merge pull request #224 from loiane/dependabot/npm_and_yarn/babel/tra…
loiane Mar 12, 2024
84c141f
Merge pull request #225 from loiane/dependabot/npm_and_yarn/async-2.6.4
loiane Mar 12, 2024
fa69786
Bump follow-redirects from 1.15.4 to 1.15.6
dependabot[bot] Mar 16, 2024
dd48e16
Merge pull request #226 from loiane/dependabot/npm_and_yarn/follow-re…
loiane Mar 23, 2024
e00c298
Merge pull request #227 from loiane/third-edition
loiane Mar 24, 2024
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
40 changes: 40 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.css eol=lf
*.df eol=lf
*.htm eol=lf
*.html eol=lf
*.java eol=lf
*.js eol=lf
*.json eol=lf
*.jsp eol=lf
*.jspf eol=lf
*.jspx eol=lf
*.properties eol=lf
*.sh eol=lf
*.tld eol=lf
*.txt eol=lf
*.tag eol=lf
*.tagx eol=lf
*.xml eol=lf
*.yml eol=lf

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.gif binary
*.ico binary
*.jar binary
*.jpg binary
*.jpeg binary
*.png binary
*.so binary
*.war binary
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "chrome",
"request": "launch",
"name": "Chrome",
"url": "http://127.0.0.1:8887/examples",
"url": "http://127.0.0.1:8080/examples",
"webRoot": "${workspaceRoot}"
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/chapter01_02/04-TruthyFalsy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ testTruthy({}); // true (object is always true)
var obj = { name: 'John' };
testTruthy(obj); // true
testTruthy(obj.name); // true
testTruthy(obj.age); // age (property does not exist)
testTruthy(obj.age); // false (property age does not exist)
2 changes: 1 addition & 1 deletion examples/chapter09/04-Fibonacci.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function fibonacciMemoization(n) {
const memo = [0, 1];
const fibonacci = (n) => {
if (memo[n] != null) return memo[n];
return memo[n] = fibonacci(n - 1, memo) + fibonacci(n - 2, memo);
return memo[n] = fibonacci(n - 1) + fibonacci(n - 2);
};
return fibonacci(n);
}
Expand Down
11 changes: 11 additions & 0 deletions examples/chapter10/01-UsingMinHeap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script src="./../PacktDataStructuresAlgorithms.min.js"></script>
<script src="01-UsingMinHeap.js"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions examples/chapter10/01-UsingMinHeap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { MinHeap } = PacktDataStructuresAlgorithms;

let heap = new MinHeap();

heap.insert(2);
heap.insert(3);
heap.insert(4);
heap.insert(5);

heap.insert(2);

console.log(heap.getAsArray());

console.log('Heap size: ', heap.size()); // 5
console.log('Heap is empty: ', heap.isEmpty()); // false
console.log('Heap min value: ', heap.findMinimum()); // 1

heap = new MinHeap();
for (let i = 1; i < 10; i++) {
heap.insert(i);
}

console.log(heap.getAsArray());

console.log('Extract minimum: ', heap.extract()); // 1
console.log(heap.getAsArray()); // [2, 4, 3, 8, 5, 6, 7, 9]

11 changes: 11 additions & 0 deletions examples/chapter10/02-UsingMaxHeap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script src="./../PacktDataStructuresAlgorithms.min.js"></script>
<script src="02-UsingMaxHeap.js"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions examples/chapter10/02-UsingMaxHeap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { MaxHeap } = PacktDataStructuresAlgorithms;

const maxHeap = new MaxHeap();

maxHeap.insert(2);
maxHeap.insert(3);
maxHeap.insert(4);
maxHeap.insert(5);

maxHeap.insert(1);

console.log(maxHeap.getAsArray());

console.log('Heap size: ', maxHeap.size()); // 5
console.log('Heap is empty: ', maxHeap.isEmpty()); // false
console.log('Heap min value: ', maxHeap.findMinimum()); // 5

maxHeap.insert(6);
maxHeap.insert(9);
maxHeap.insert(10);
maxHeap.insert(14);

console.log(maxHeap.getAsArray());

console.log('Extract minimum: ', maxHeap.extract());
console.log(maxHeap.getAsArray());

11 changes: 11 additions & 0 deletions examples/chapter10/03-HeapSort.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script src="./../PacktDataStructuresAlgorithms.min.js"></script>
<script src="03-HeapSort.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions examples/chapter10/03-HeapSort.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { heapSort } = PacktDataStructuresAlgorithms;

console.log('********** Heap Sort **********');
const array = [7, 6, 3, 5, 4, 1, 2];

console.log('Before sorting: ', array);
console.log('After sorting: ', heapSort(array));
17 changes: 10 additions & 7 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,18 @@
</div>
</section>
<section class="mdl-layout__tab-panel" id="scroll-tab-10">
<div class="page-content">
<div class="page-content mdl-layout--fixed-drawer">
<div class="mdl-layout__drawer is-visible">
<nav class="mdl-navigation">
</nav>
</div>
<div class="page-content">
<div class="page-content mdl-layout--fixed-drawer">
<div class="mdl-layout__drawer is-visible">
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="chapter10/01-UsingMinHeap.html">01-UsingMinHeap</a>
<a class="mdl-navigation__link" href="chapter10/02-UsingMaxHeap.html">02-UsingMaxHeap</a>
<a class="mdl-navigation__link" href="chapter10/03-HeapSort.html">03-HeapSort</a>
</nav>
</div>
</div>
</section>
</div>
</section>
<section class="mdl-layout__tab-panel" id="scroll-tab-11">
<div class="page-content">
<div class="page-content mdl-layout--fixed-drawer">
Expand Down
Loading