Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit fd258c9

Browse files
committed
Restructure repo.
1 parent 6a956ca commit fd258c9

File tree

162 files changed

+510
-416
lines changed

Some content is hidden

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

162 files changed

+510
-416
lines changed

.editorconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
root = true
66

7-
87
[*]
9-
108
indent_style = space
119
indent_size = 2
1210
end_of_line = lf

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
.DS_Store
22
.idea
3-
/out
4-
/core
53
node_modules
64
*.o

.jshintignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
node_modules
2-
problems/shortest-fizz-buzz
1+
solutions/javascript/shortest-fizz-buzz.js

.jshintrc

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
{
2-
"node": true,
3-
"browser": true,
4-
"jquery": true,
5-
"devel": true,
6-
"nonstandard": true,
7-
"worker": true,
8-
"esnext": true,
9-
"bitwise": false,
10-
"boss": true,
11-
"camelcase": true,
12-
"curly": true,
13-
"eqeqeq": true,
14-
"eqnull": true,
15-
"expr": true,
16-
"forin": true,
17-
"immed": true,
18-
"latedef": true,
19-
"newcap": true,
20-
"noarg": true,
21-
"quotmark": "single",
22-
"regexp": true,
23-
"strict": false,
24-
"undef": true,
25-
"unused": true,
26-
"trailing": true,
27-
"smarttabs": true,
28-
"immed": true,
2+
"maxerr": 100, // Maximum errors before stopping.
3+
"maxlen": 80, // Maximum line length.
4+
"quotmark": "single", // Consistent quotation mark usage.
5+
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
6+
"curly": true, // Require {} for every new block or scope.
7+
"eqeqeq": true, // Require triple equals i.e. `===`.
8+
"forin": false, // Tolerate `for in` loops without `hasOwnPrototype`.
9+
"immed": true, // Require immediate invocations to be wrapped in parens. E.g. `(function(){})();`.
10+
"latedef": false, // Prohibit variable use before definition.
11+
"newcap": true, // Require capitalization of all constructor functions. E.g. `new F()`.
12+
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
13+
"noempty": true, // Prohibit use of empty blocks.
14+
"nonew": true, // Prohibit use of constructors for side-effects.
15+
"undef": true, // Require all non-global variables be declared before they are used.
16+
"unused": true, // Warn when creating a variable but never using it.
17+
"plusplus": false, // Prohibit use of `++` & `--`.
18+
"regexp": false, // Prohibit `.` and `[^...]` in regular expressions.
19+
"strict": false, // Require `use strict` pragma in every file.
20+
"trailing": true, // Prohibit trailing whitespaces.
21+
"boss": true, // Tolerate assignments inside if, for and while. Usually conditions and loops are for comparison, not assignments.
22+
"multistr": false, // Prohibit the use of multi-line strings.
23+
"eqnull": true, // Tolerate use of `== null`.
24+
"expr": true, // Tolerate `ExpressionStatement` as Programs.
25+
"browser": true, // Standard browser globals e.g. `window`, `document`.
26+
"node": true, // Enable standard globals available when code is running inside of the NodeJS runtime environment.
2927
"globals": {
30-
"it": true,
28+
"it": true,
3129
"describe": true
3230
}
3331
}

CONTRIBUTING.md

Lines changed: 12 additions & 2 deletions

Readme.md

Lines changed: 4 additions & 4 deletions

binary-search-tree-check/binary-search-tree-check-alt.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

factorial/factorial.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@
44
"private": true,
55
"description": "Repository full of code problems and common solutions.",
66
"main": null,
7-
"directories": {
8-
"test": "tests"
9-
},
107
"dependencies": {},
118
"devDependencies": {
129
"mocha": "~1.11.0",
1310
"jshint": "~2.1.3"
1411
},
1512
"scripts": {
16-
"lint": "./node_modules/.bin/jshint .",
17-
"test": "npm run lint && ./node_modules/.bin/mocha tests/javascript"
13+
"test": "jshint solutions/javascript && mocha tests/javascript"
1814
},
1915
"repository": {
2016
"type": "git",

problems/binary-search-tree-check/binary-search-tree-check.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

problems/binary-search-tree/Readme.md

Lines changed: 1 addition & 5 deletions

problems/byte-format/byte-format.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

problems/convert-array/convert-array.js

Whitespace-only changes.

problems/transform-word/Readme.md

Lines changed: 6 additions & 0 deletions

problems/word-analytics/word-analytics.js

Lines changed: 0 additions & 97 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

problems/anagram-detection/anagram-detection.js renamed to solutions/javascript/anagram-detection.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Simple function that will take a string of latin characters and return a unique hash
21
var hashString = function (str) {
32
// Map characters to prime numbers to multiply
43
var charMap = {
@@ -66,7 +65,7 @@ module.exports = function (parent, child) {
6665
anagram = hashString(child),
6766
total = 0;
6867

69-
for (var i = 0; i < (parent.length - length); i++) {
68+
for (var i = 0; i < parent.length - length; i++) {
7069
if (hashString(parent.substr(i, length)) === anagram) {
7170
total += 1;
7271
}

problems/array-pair-sum/array-pair-sum.js renamed to solutions/javascript/array-pair-sum.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// This is just a modification of the integer difference problem presented elsewhere
21
module.exports = function (k, array) {
32
var hash = {},
43
pairs = [];

0 commit comments

Comments
 (0)