Skip to content

Commit 3e68460

Browse files
committed
init third edition
1 parent c44e749 commit 3e68460

File tree

11,871 files changed

+1283445
-6080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,871 files changed

+1283445
-6080
lines changed

.babelrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["es2015"],
3+
"plugins": ["babel-plugin-add-module-exports"]
4+
}

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = LF
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintrc.json

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
"parser": "babel-eslint",
9+
"rules": {
10+
"block-scoped-var": 2,
11+
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
12+
"camelcase": [2, { "properties": "always" }],
13+
"comma-dangle": [2, "never"],
14+
"comma-spacing": [2, { "before": false, "after": true }],
15+
"comma-style": [2, "last"],
16+
"complexity": 0,
17+
"consistent-return": 2,
18+
"consistent-this": 0,
19+
"curly": [2, "multi-line"],
20+
"default-case": 0,
21+
"dot-location": [2, "property"],
22+
"dot-notation": 0,
23+
"eol-last": 2,
24+
"eqeqeq": [2, "allow-null"],
25+
"func-names": 0,
26+
"func-style": 0,
27+
"generator-star-spacing": [2, "both"],
28+
"guard-for-in": 0,
29+
"handle-callback-err": [2, "^(err|error|anySpecificError)$"],
30+
"indent": [2, 2, { "SwitchCase": 1 }],
31+
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
32+
"keyword-spacing": [2, { "before": true, "after": true }],
33+
"linebreak-style": 0,
34+
"max-depth": 0,
35+
"max-len": [2, 120, 4],
36+
"max-nested-callbacks": 0,
37+
"max-params": 0,
38+
"max-statements": 0,
39+
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
40+
"newline-after-var": [2, "always"],
41+
"new-parens": 2,
42+
"no-alert": 0,
43+
"no-array-constructor": 2,
44+
"no-bitwise": 0,
45+
"no-caller": 2,
46+
"no-catch-shadow": 0,
47+
"no-cond-assign": 2,
48+
"no-console": 0,
49+
"no-constant-condition": 0,
50+
"no-continue": 0,
51+
"no-control-regex": 2,
52+
"no-debugger": 2,
53+
"no-delete-var": 2,
54+
"no-div-regex": 0,
55+
"no-dupe-args": 2,
56+
"no-dupe-keys": 2,
57+
"no-duplicate-case": 2,
58+
"no-else-return": 2,
59+
"no-empty": 0,
60+
"no-empty-character-class": 2,
61+
"no-eq-null": 0,
62+
"no-eval": 2,
63+
"no-ex-assign": 2,
64+
"no-extend-native": 2,
65+
"no-extra-bind": 2,
66+
"no-extra-boolean-cast": 2,
67+
"no-extra-parens": 0,
68+
"no-extra-semi": 0,
69+
"no-extra-strict": 0,
70+
"no-fallthrough": 2,
71+
"no-floating-decimal": 2,
72+
"no-func-assign": 2,
73+
"no-implied-eval": 2,
74+
"no-inline-comments": 0,
75+
"no-inner-declarations": [2, "functions"],
76+
"no-invalid-regexp": 2,
77+
"no-irregular-whitespace": 2,
78+
"no-iterator": 2,
79+
"no-label-var": 2,
80+
"no-labels": 2,
81+
"no-lone-blocks": 0,
82+
"no-lonely-if": 0,
83+
"no-loop-func": 0,
84+
"no-mixed-requires": 0,
85+
"no-mixed-spaces-and-tabs": [2, false],
86+
"no-multi-spaces": 2,
87+
"no-multi-str": 2,
88+
"no-multiple-empty-lines": [2, { "max": 1 }],
89+
"no-native-reassign": 2,
90+
"no-negated-in-lhs": 2,
91+
"no-nested-ternary": 0,
92+
"no-new": 2,
93+
"no-new-func": 2,
94+
"no-new-object": 2,
95+
"no-new-require": 2,
96+
"no-new-wrappers": 2,
97+
"no-obj-calls": 2,
98+
"no-octal": 2,
99+
"no-octal-escape": 2,
100+
"no-path-concat": 0,
101+
"no-plusplus": 0,
102+
"no-process-env": 0,
103+
"no-process-exit": 0,
104+
"no-proto": 2,
105+
"no-redeclare": 2,
106+
"no-regex-spaces": 2,
107+
"no-reserved-keys": 0,
108+
"no-restricted-modules": 0,
109+
"no-return-assign": 2,
110+
"no-script-url": 0,
111+
"no-self-compare": 2,
112+
"no-sequences": 2,
113+
"no-shadow": 0,
114+
"no-shadow-restricted-names": 2,
115+
"no-spaced-func": 2,
116+
"no-sparse-arrays": 2,
117+
"no-sync": 0,
118+
"no-ternary": 0,
119+
"no-throw-literal": 2,
120+
"no-trailing-spaces": 2,
121+
"no-undef": 2,
122+
"no-undef-init": 2,
123+
"no-undefined": 0,
124+
"no-underscore-dangle": 0,
125+
"no-unneeded-ternary": 2,
126+
"no-unreachable": 2,
127+
"no-unused-expressions": 0,
128+
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
129+
"no-use-before-define": 2,
130+
"no-var": 0,
131+
"no-void": 0,
132+
"no-warning-comments": 0,
133+
"no-with": 2,
134+
"one-var": 0,
135+
"operator-assignment": 0,
136+
"operator-linebreak": [2, "after"],
137+
"padded-blocks": 0,
138+
"quote-props": 0,
139+
"quotes": [2, "single", "avoid-escape"],
140+
"radix": 2,
141+
"semi": [2, "always"],
142+
"semi-spacing": 0,
143+
"sort-vars": 0,
144+
"space-before-blocks": [2, "always"],
145+
"space-before-function-paren": [
146+
2,
147+
{ "anonymous": "always", "named": "never" }
148+
],
149+
"space-in-brackets": 0,
150+
"space-in-parens": [2, "never"],
151+
"space-infix-ops": 2,
152+
"space-unary-ops": [2, { "words": true, "nonwords": false }],
153+
"spaced-comment": [2, "always"],
154+
"strict": 0,
155+
"use-isnan": 2,
156+
"valid-jsdoc": 0,
157+
"valid-typeof": 2,
158+
"vars-on-top": 2,
159+
"wrap-iife": [2, "any"],
160+
"wrap-regex": 0,
161+
"yoda": [2, "never"]
162+
}
163+
}

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- node
4+
script: "make"
5+
after_success: "make coveralls"

.vscode/tasks.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"taskName": "echo",
8+
"type": "shell",
9+
"command": "echo Hello"
10+
}
11+
]
12+
}

Makefile

Whitespace-only changes.

README.md

+1-40
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,4 @@
11
Learning JavaScript Data Structures and Algorithms
22
====================================
33

4-
Source code of **Learning JavaScript Data Structures and Algorithms** book.
5-
6-
| 1st edition | 2nd edition |
7-
| ------------- |:-------------:|
8-
| ![1st edition](https://d1ldz4te4covpm.cloudfront.net/sites/default/files/imagecache/ppv4_main_book_cover/4874OS_Learning%20JavaScript%20Data%20Structures%20and%20Algorithms.jpg) | ![2nd edition](https://d255esdrn735hr.cloudfront.net/sites/default/files/imagecache/ppv4_main_book_cover/5493OS_5348_Learning%20JavaScript%20Data%20Structures%20and%20Algorithms,%20Second%20Edition.jpg) |
9-
| [Book link](http://amzn.to/1Y1OWPx)| [Book link](http://amzn.to/1TSkcA1)|
10-
11-
Book link - first edition:
12-
- [Packt](https://www.packtpub.com/application-development/learning-javascript-data-structures-and-algorithms)
13-
- [Amazon](http://amzn.to/1Y1OWPx)
14-
- [Chinese version](http://www.ituring.com.cn/book/1613)
15-
- [Korean version](http://www.acornpub.co.kr/book/javascript-data-structure)
16-
17-
Book link - second edition:
18-
- [Packt](https://www.packtpub.com/web-development/learning-javascript-data-structures-and-algorithms-second-edition)
19-
- [Amazon](http://amzn.to/1TSkcA1)
20-
- [Brazilian Portuguese version](https://novatec.com.br/livros/estruturas-de-dados-algoritmos-em-javascript/)
21-
22-
### List of Chapters:
23-
24-
* 01: [JavaScript: a quick overview](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter01)
25-
* 02: [Arrays](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter02)
26-
* 03: [Stacks](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter03)
27-
* 04: [Queues](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter04)
28-
* 05: [Linked Lists](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter05)
29-
* 06: [Sets](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter06)
30-
* 07: [Dictionaries and Hashes](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter07)
31-
* 08: [Trees](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter08)
32-
* 09: [Graphs](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter09)
33-
* 10: [Sorting and searching algorithms](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter10)
34-
* 11: [Pattern of algorithms](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter11)
35-
* 12: [Algorithm Complexity](https://github.com/loiane/javascript-datastructures-algorithms/tree/second-edition/chapter12)
36-
37-
### First Edition source code:
38-
39-
Please refer to [this link](https://github.com/loiane/javascript-datastructures-algorithms/tree/master)
40-
41-
### Found an issue or have a question?
42-
43-
Please create an [Issue](https://github.com/loiane/javascript-datastructures-algorithms/issues) or [Pull Request](https://github.com/loiane/javascript-datastructures-algorithms/pulls)
4+
Source code of **Learning JavaScript Data Structures and Algorithms** book.

chapter02/01-Introduction.html

-10
This file was deleted.

chapter02/01-Introduction.js

-12
This file was deleted.

chapter02/02-CreatingAndInitialingArrays.html

-10
This file was deleted.

chapter02/02-CreatingAndInitialingArrays.js

-34
This file was deleted.

chapter02/03-AddingRemovingElements.html

-10
This file was deleted.

0 commit comments

Comments
 (0)