fibonacci functions completed
This commit is contained in:
parent
c40b9d065b
commit
9824b7328f
7 changed files with 15612 additions and 0 deletions
6
.eslintrc.js
Normal file
6
.eslintrc.js
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = {
|
||||||
|
"extends": [
|
||||||
|
"eslint-config-prettier",
|
||||||
|
"prettier"
|
||||||
|
]
|
||||||
|
}
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
||||||
1
.prettierrc.json
Normal file
1
.prettierrc.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
15130
package-lock.json
generated
Normal file
15130
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
450
package.json
Normal file
450
package.json
Normal file
|
|
@ -0,0 +1,450 @@
|
||||||
|
{
|
||||||
|
"name": "js-recursion",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Fibonacci sequence and Merge Sort implemented in ES6",
|
||||||
|
"main": "fibonacci.js",
|
||||||
|
"dependencies": {
|
||||||
|
"abbrev": "^1.1.1",
|
||||||
|
"abort-controller": "^3.0.0",
|
||||||
|
"acorn": "^8.9.0",
|
||||||
|
"acorn-import-assertions": "^1.9.0",
|
||||||
|
"acorn-jsx": "^5.3.2",
|
||||||
|
"agent-base": "^6.0.2",
|
||||||
|
"agentkeepalive": "^4.3.0",
|
||||||
|
"aggregate-error": "^3.1.0",
|
||||||
|
"ajv": "^6.12.6",
|
||||||
|
"ajv-formats": "^2.1.1",
|
||||||
|
"ajv-keywords": "^3.5.2",
|
||||||
|
"ansi-escapes": "^4.3.2",
|
||||||
|
"ansi-regex": "^5.0.1",
|
||||||
|
"ansi-styles": "^4.3.0",
|
||||||
|
"aproba": "^2.0.0",
|
||||||
|
"are-we-there-yet": "^2.0.0",
|
||||||
|
"argparse": "^1.0.10",
|
||||||
|
"array-differ": "^3.0.0",
|
||||||
|
"array-union": "^2.1.0",
|
||||||
|
"arrify": "^2.0.1",
|
||||||
|
"asap": "^2.0.6",
|
||||||
|
"async": "^3.2.4",
|
||||||
|
"babel-loader": "^9.1.2",
|
||||||
|
"babel-plugin-polyfill-corejs2": "^0.4.3",
|
||||||
|
"babel-plugin-polyfill-corejs3": "^0.8.1",
|
||||||
|
"babel-plugin-polyfill-regenerator": "^0.5.0",
|
||||||
|
"balanced-match": "^1.0.2",
|
||||||
|
"base64-js": "^1.5.1",
|
||||||
|
"before-after-hook": "^2.2.3",
|
||||||
|
"bin-links": "^3.0.3",
|
||||||
|
"binaryextensions": "^4.18.0",
|
||||||
|
"bl": "^4.1.0",
|
||||||
|
"brace-expansion": "^1.1.11",
|
||||||
|
"braces": "^3.0.2",
|
||||||
|
"browserslist": "^4.21.9",
|
||||||
|
"buffer": "^5.7.1",
|
||||||
|
"buffer-from": "^1.1.2",
|
||||||
|
"builtins": "^1.0.3",
|
||||||
|
"cacache": "^15.3.0",
|
||||||
|
"callsites": "^3.1.0",
|
||||||
|
"caniuse-lite": "^1.0.30001507",
|
||||||
|
"chalk": "^4.1.2",
|
||||||
|
"chardet": "^0.7.0",
|
||||||
|
"chownr": "^2.0.0",
|
||||||
|
"chrome-trace-event": "^1.0.3",
|
||||||
|
"clean-stack": "^2.2.0",
|
||||||
|
"cli-cursor": "^3.1.0",
|
||||||
|
"cli-spinners": "^2.9.0",
|
||||||
|
"cli-table": "^0.3.11",
|
||||||
|
"cli-width": "^3.0.0",
|
||||||
|
"clone": "^2.1.2",
|
||||||
|
"clone-buffer": "^1.0.0",
|
||||||
|
"clone-deep": "^4.0.1",
|
||||||
|
"clone-stats": "^1.0.0",
|
||||||
|
"cloneable-readable": "^1.1.3",
|
||||||
|
"cmd-shim": "^5.0.0",
|
||||||
|
"color-convert": "^2.0.1",
|
||||||
|
"color-name": "^1.1.4",
|
||||||
|
"color-support": "^1.1.3",
|
||||||
|
"colorette": "^2.0.20",
|
||||||
|
"colors": "^1.0.3",
|
||||||
|
"commander": "^2.20.3",
|
||||||
|
"common-ancestor-path": "^1.0.1",
|
||||||
|
"commondir": "^1.0.1",
|
||||||
|
"concat-map": "^0.0.1",
|
||||||
|
"console-control-strings": "^1.1.0",
|
||||||
|
"convert-source-map": "^1.9.0",
|
||||||
|
"core-js-compat": "^3.31.0",
|
||||||
|
"core-util-is": "^1.0.3",
|
||||||
|
"cross-spawn": "^7.0.3",
|
||||||
|
"css-loader": "^6.7.3",
|
||||||
|
"cssesc": "^3.0.0",
|
||||||
|
"dargs": "^7.0.0",
|
||||||
|
"dateformat": "^4.6.3",
|
||||||
|
"debug": "^4.3.4",
|
||||||
|
"debuglog": "^1.0.1",
|
||||||
|
"deep-extend": "^0.6.0",
|
||||||
|
"deep-is": "^0.1.4",
|
||||||
|
"defaults": "^1.0.4",
|
||||||
|
"delegates": "^1.0.0",
|
||||||
|
"depd": "^2.0.0",
|
||||||
|
"deprecation": "^2.3.1",
|
||||||
|
"dezalgo": "^1.0.4",
|
||||||
|
"diff": "^5.1.0",
|
||||||
|
"dir-glob": "^3.0.1",
|
||||||
|
"doctrine": "^3.0.0",
|
||||||
|
"eastasianwidth": "^0.2.0",
|
||||||
|
"ejs": "^3.1.9",
|
||||||
|
"electron-to-chromium": "^1.4.440",
|
||||||
|
"emoji-regex": "^8.0.0",
|
||||||
|
"encoding": "^0.1.13",
|
||||||
|
"enhanced-resolve": "^5.15.0",
|
||||||
|
"env-paths": "^2.2.1",
|
||||||
|
"envinfo": "^7.9.0",
|
||||||
|
"err-code": "^2.0.3",
|
||||||
|
"error": "^10.4.0",
|
||||||
|
"error-ex": "^1.3.2",
|
||||||
|
"es-module-lexer": "^1.3.0",
|
||||||
|
"escalade": "^3.1.1",
|
||||||
|
"escape-string-regexp": "^4.0.0",
|
||||||
|
"eslint-scope": "^5.1.1",
|
||||||
|
"eslint-visitor-keys": "^3.4.1",
|
||||||
|
"espree": "^9.5.2",
|
||||||
|
"esprima": "^4.0.1",
|
||||||
|
"esquery": "^1.5.0",
|
||||||
|
"esrecurse": "^4.3.0",
|
||||||
|
"estraverse": "^4.3.0",
|
||||||
|
"esutils": "^2.0.3",
|
||||||
|
"event-target-shim": "^5.0.1",
|
||||||
|
"eventemitter3": "^4.0.7",
|
||||||
|
"events": "^3.3.0",
|
||||||
|
"execa": "^5.1.1",
|
||||||
|
"exponential-backoff": "^3.1.1",
|
||||||
|
"external-editor": "^3.1.0",
|
||||||
|
"fast-deep-equal": "^3.1.3",
|
||||||
|
"fast-glob": "^3.2.12",
|
||||||
|
"fast-json-stable-stringify": "^2.1.0",
|
||||||
|
"fast-levenshtein": "^2.0.6",
|
||||||
|
"fastest-levenshtein": "^1.0.16",
|
||||||
|
"fastq": "^1.15.0",
|
||||||
|
"figures": "^3.2.0",
|
||||||
|
"file-entry-cache": "^6.0.1",
|
||||||
|
"filelist": "^1.0.4",
|
||||||
|
"fill-range": "^7.0.1",
|
||||||
|
"find-cache-dir": "^3.3.2",
|
||||||
|
"find-up": "^4.1.0",
|
||||||
|
"find-yarn-workspace-root2": "^1.2.16",
|
||||||
|
"first-chunk-stream": "^2.0.0",
|
||||||
|
"flat-cache": "^3.0.4",
|
||||||
|
"flatted": "^3.2.7",
|
||||||
|
"foreground-child": "^3.1.1",
|
||||||
|
"fs-minipass": "^2.1.0",
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"gauge": "^3.0.2",
|
||||||
|
"gensync": "^1.0.0-beta.2",
|
||||||
|
"get-stream": "^6.0.1",
|
||||||
|
"github-username": "^6.0.0",
|
||||||
|
"glob": "^8.1.0",
|
||||||
|
"glob-parent": "^5.1.2",
|
||||||
|
"glob-to-regexp": "^0.4.1",
|
||||||
|
"globals": "^11.12.0",
|
||||||
|
"globby": "^11.1.0",
|
||||||
|
"graceful-fs": "^4.2.11",
|
||||||
|
"graphemer": "^1.4.0",
|
||||||
|
"grouped-queue": "^2.0.0",
|
||||||
|
"has": "^1.0.3",
|
||||||
|
"has-flag": "^4.0.0",
|
||||||
|
"has-unicode": "^2.0.1",
|
||||||
|
"hosted-git-info": "^4.1.0",
|
||||||
|
"http-cache-semantics": "^4.1.1",
|
||||||
|
"http-proxy-agent": "^4.0.1",
|
||||||
|
"https-proxy-agent": "^5.0.1",
|
||||||
|
"human-signals": "^2.1.0",
|
||||||
|
"humanize-ms": "^1.2.1",
|
||||||
|
"iconv-lite": "^0.4.24",
|
||||||
|
"icss-utils": "^5.1.0",
|
||||||
|
"ieee754": "^1.2.1",
|
||||||
|
"ignore": "^5.2.4",
|
||||||
|
"ignore-walk": "^4.0.1",
|
||||||
|
"import-fresh": "^3.3.0",
|
||||||
|
"import-local": "^3.1.0",
|
||||||
|
"imurmurhash": "^0.1.4",
|
||||||
|
"indent-string": "^4.0.0",
|
||||||
|
"infer-owner": "^1.0.4",
|
||||||
|
"inflight": "^1.0.6",
|
||||||
|
"inherits": "^2.0.4",
|
||||||
|
"inquirer": "^8.2.5",
|
||||||
|
"interpret": "^3.1.1",
|
||||||
|
"ip": "^2.0.0",
|
||||||
|
"is-arrayish": "^0.2.1",
|
||||||
|
"is-core-module": "^2.12.1",
|
||||||
|
"is-extglob": "^2.1.1",
|
||||||
|
"is-fullwidth-code-point": "^3.0.0",
|
||||||
|
"is-glob": "^4.0.3",
|
||||||
|
"is-interactive": "^1.0.0",
|
||||||
|
"is-lambda": "^1.0.1",
|
||||||
|
"is-number": "^7.0.0",
|
||||||
|
"is-path-inside": "^3.0.3",
|
||||||
|
"is-plain-obj": "^2.1.0",
|
||||||
|
"is-plain-object": "^2.0.4",
|
||||||
|
"is-scoped": "^2.1.0",
|
||||||
|
"is-stream": "^2.0.1",
|
||||||
|
"is-unicode-supported": "^0.1.0",
|
||||||
|
"is-utf8": "^0.2.1",
|
||||||
|
"isarray": "^1.0.0",
|
||||||
|
"isbinaryfile": "^4.0.10",
|
||||||
|
"isexe": "^2.0.0",
|
||||||
|
"isobject": "^3.0.1",
|
||||||
|
"jackspeak": "^2.2.1",
|
||||||
|
"jake": "^10.8.7",
|
||||||
|
"jest-worker": "^27.5.1",
|
||||||
|
"js-tokens": "^4.0.0",
|
||||||
|
"js-yaml": "^3.14.1",
|
||||||
|
"jsesc": "^2.5.2",
|
||||||
|
"json-parse-even-better-errors": "^2.3.1",
|
||||||
|
"json-schema-traverse": "^0.4.1",
|
||||||
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
|
"json-stringify-nice": "^1.1.4",
|
||||||
|
"json5": "^2.2.3",
|
||||||
|
"jsonparse": "^1.3.1",
|
||||||
|
"just-diff": "^5.2.0",
|
||||||
|
"just-diff-apply": "^5.5.0",
|
||||||
|
"kind-of": "^6.0.3",
|
||||||
|
"levn": "^0.4.1",
|
||||||
|
"lines-and-columns": "^1.2.4",
|
||||||
|
"load-yaml-file": "^0.2.0",
|
||||||
|
"loader-runner": "^4.3.0",
|
||||||
|
"locate-path": "^5.0.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"lodash.debounce": "^4.0.8",
|
||||||
|
"lodash.merge": "^4.6.2",
|
||||||
|
"log-symbols": "^4.1.0",
|
||||||
|
"lru-cache": "^6.0.0",
|
||||||
|
"make-dir": "^3.1.0",
|
||||||
|
"make-fetch-happen": "^9.1.0",
|
||||||
|
"mem-fs": "^2.3.0",
|
||||||
|
"mem-fs-editor": "^9.7.0",
|
||||||
|
"merge-stream": "^2.0.0",
|
||||||
|
"merge2": "^1.4.1",
|
||||||
|
"micromatch": "^4.0.5",
|
||||||
|
"mime-db": "^1.52.0",
|
||||||
|
"mime-types": "^2.1.35",
|
||||||
|
"mimic-fn": "^2.1.0",
|
||||||
|
"mini-css-extract-plugin": "^2.7.6",
|
||||||
|
"minimatch": "^3.1.2",
|
||||||
|
"minimist": "^1.2.8",
|
||||||
|
"minipass": "^3.3.6",
|
||||||
|
"minipass-collect": "^1.0.2",
|
||||||
|
"minipass-fetch": "^1.4.1",
|
||||||
|
"minipass-flush": "^1.0.5",
|
||||||
|
"minipass-json-stream": "^1.0.1",
|
||||||
|
"minipass-pipeline": "^1.2.4",
|
||||||
|
"minipass-sized": "^1.0.3",
|
||||||
|
"minizlib": "^2.1.2",
|
||||||
|
"mkdirp": "^1.0.4",
|
||||||
|
"mkdirp-infer-owner": "^2.0.0",
|
||||||
|
"ms": "^2.1.2",
|
||||||
|
"multimatch": "^5.0.0",
|
||||||
|
"mute-stream": "^0.0.8",
|
||||||
|
"nanoid": "^3.3.4",
|
||||||
|
"natural-compare": "^1.4.0",
|
||||||
|
"negotiator": "^0.6.3",
|
||||||
|
"neo-async": "^2.6.2",
|
||||||
|
"node-fetch": "^2.6.11",
|
||||||
|
"node-gyp": "^8.4.1",
|
||||||
|
"node-releases": "^2.0.12",
|
||||||
|
"nopt": "^5.0.0",
|
||||||
|
"normalize-package-data": "^2.5.0",
|
||||||
|
"normalize-path": "^3.0.0",
|
||||||
|
"npm-bundled": "^1.1.2",
|
||||||
|
"npm-install-checks": "^4.0.0",
|
||||||
|
"npm-normalize-package-bin": "^1.0.1",
|
||||||
|
"npm-package-arg": "^8.1.5",
|
||||||
|
"npm-packlist": "^3.0.0",
|
||||||
|
"npm-pick-manifest": "^6.1.1",
|
||||||
|
"npm-registry-fetch": "^12.0.2",
|
||||||
|
"npm-run-path": "^4.0.1",
|
||||||
|
"npmlog": "^5.0.1",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"once": "^1.4.0",
|
||||||
|
"onetime": "^5.1.2",
|
||||||
|
"optionator": "^0.9.1",
|
||||||
|
"ora": "^5.4.1",
|
||||||
|
"os-tmpdir": "^1.0.2",
|
||||||
|
"p-finally": "^1.0.0",
|
||||||
|
"p-limit": "^2.3.0",
|
||||||
|
"p-locate": "^4.1.0",
|
||||||
|
"p-map": "^4.0.0",
|
||||||
|
"p-queue": "^6.6.2",
|
||||||
|
"p-timeout": "^3.2.0",
|
||||||
|
"p-transform": "^1.3.0",
|
||||||
|
"p-try": "^2.2.0",
|
||||||
|
"pacote": "^12.0.3",
|
||||||
|
"parent-module": "^1.0.1",
|
||||||
|
"parse-conflict-json": "^2.0.2",
|
||||||
|
"parse-json": "^5.2.0",
|
||||||
|
"path-exists": "^4.0.0",
|
||||||
|
"path-is-absolute": "^1.0.1",
|
||||||
|
"path-key": "^3.1.1",
|
||||||
|
"path-parse": "^1.0.7",
|
||||||
|
"path-scurry": "^1.9.2",
|
||||||
|
"path-type": "^4.0.0",
|
||||||
|
"picocolors": "^1.0.0",
|
||||||
|
"picomatch": "^2.3.1",
|
||||||
|
"pify": "^2.3.0",
|
||||||
|
"pkg-dir": "^4.2.0",
|
||||||
|
"postcss": "^8.4.21",
|
||||||
|
"postcss-modules-extract-imports": "^3.0.0",
|
||||||
|
"postcss-modules-local-by-default": "^4.0.0",
|
||||||
|
"postcss-modules-scope": "^3.0.0",
|
||||||
|
"postcss-modules-values": "^4.0.0",
|
||||||
|
"postcss-selector-parser": "^6.0.11",
|
||||||
|
"postcss-value-parser": "^4.2.0",
|
||||||
|
"preferred-pm": "^3.0.3",
|
||||||
|
"prelude-ls": "^1.2.1",
|
||||||
|
"pretty-bytes": "^5.6.0",
|
||||||
|
"proc-log": "^1.0.0",
|
||||||
|
"process": "^0.11.10",
|
||||||
|
"process-nextick-args": "^2.0.1",
|
||||||
|
"promise-all-reject-late": "^1.0.1",
|
||||||
|
"promise-call-limit": "^1.0.2",
|
||||||
|
"promise-inflight": "^1.0.1",
|
||||||
|
"promise-retry": "^2.0.1",
|
||||||
|
"punycode": "^2.3.0",
|
||||||
|
"queue-microtask": "^1.2.3",
|
||||||
|
"randombytes": "^2.1.0",
|
||||||
|
"read-cmd-shim": "^3.0.1",
|
||||||
|
"read-package-json": "^6.0.4",
|
||||||
|
"read-package-json-fast": "^2.0.3",
|
||||||
|
"read-pkg": "^5.2.0",
|
||||||
|
"read-pkg-up": "^7.0.1",
|
||||||
|
"readable-stream": "^4.4.0",
|
||||||
|
"readdir-scoped-modules": "^1.1.0",
|
||||||
|
"rechoir": "^0.8.0",
|
||||||
|
"regenerate": "^1.4.2",
|
||||||
|
"regenerate-unicode-properties": "^10.1.0",
|
||||||
|
"regenerator-runtime": "^0.13.11",
|
||||||
|
"regenerator-transform": "^0.15.1",
|
||||||
|
"regexpu-core": "^5.3.2",
|
||||||
|
"regjsparser": "^0.9.1",
|
||||||
|
"remove-trailing-separator": "^1.1.0",
|
||||||
|
"replace-ext": "^1.0.1",
|
||||||
|
"require-from-string": "^2.0.2",
|
||||||
|
"resolve": "^1.22.2",
|
||||||
|
"resolve-cwd": "^3.0.0",
|
||||||
|
"resolve-from": "^5.0.0",
|
||||||
|
"restore-cursor": "^3.1.0",
|
||||||
|
"retry": "^0.12.0",
|
||||||
|
"reusify": "^1.0.4",
|
||||||
|
"rimraf": "^3.0.2",
|
||||||
|
"run-async": "^2.4.1",
|
||||||
|
"run-parallel": "^1.2.0",
|
||||||
|
"rxjs": "^7.8.1",
|
||||||
|
"safe-buffer": "^5.2.1",
|
||||||
|
"safer-buffer": "^2.1.2",
|
||||||
|
"schema-utils": "^3.3.0",
|
||||||
|
"scoped-regex": "^2.1.0",
|
||||||
|
"semver": "^7.5.3",
|
||||||
|
"serialize-javascript": "^6.0.1",
|
||||||
|
"set-blocking": "^2.0.0",
|
||||||
|
"shallow-clone": "^3.0.1",
|
||||||
|
"shebang-command": "^2.0.0",
|
||||||
|
"shebang-regex": "^3.0.0",
|
||||||
|
"shelljs": "^0.8.5",
|
||||||
|
"signal-exit": "^3.0.7",
|
||||||
|
"sigstore": "^1.6.0",
|
||||||
|
"slash": "^3.0.0",
|
||||||
|
"smart-buffer": "^4.2.0",
|
||||||
|
"socks": "^2.7.1",
|
||||||
|
"socks-proxy-agent": "^6.2.1",
|
||||||
|
"sort-keys": "^4.2.0",
|
||||||
|
"source-map": "^0.6.1",
|
||||||
|
"source-map-js": "^1.0.2",
|
||||||
|
"source-map-support": "^0.5.21",
|
||||||
|
"spdx-correct": "^3.2.0",
|
||||||
|
"spdx-exceptions": "^2.3.0",
|
||||||
|
"spdx-expression-parse": "^3.0.1",
|
||||||
|
"spdx-license-ids": "^3.0.13",
|
||||||
|
"sprintf-js": "^1.0.3",
|
||||||
|
"ssri": "^8.0.1",
|
||||||
|
"string_decoder": "^1.3.0",
|
||||||
|
"string-width": "^4.2.3",
|
||||||
|
"string-width-cjs": "^4.2.3",
|
||||||
|
"strip-ansi": "^6.0.1",
|
||||||
|
"strip-ansi-cjs": "^6.0.1",
|
||||||
|
"strip-bom": "^2.0.0",
|
||||||
|
"strip-bom-buf": "^1.0.0",
|
||||||
|
"strip-bom-stream": "^2.0.0",
|
||||||
|
"strip-final-newline": "^2.0.0",
|
||||||
|
"strip-json-comments": "^3.1.1",
|
||||||
|
"style-loader": "^3.3.1",
|
||||||
|
"supports-color": "^8.1.1",
|
||||||
|
"supports-preserve-symlinks-flag": "^1.0.0",
|
||||||
|
"tapable": "^2.2.1",
|
||||||
|
"tar": "^6.1.15",
|
||||||
|
"terser": "^5.18.1",
|
||||||
|
"terser-webpack-plugin": "^5.3.9",
|
||||||
|
"text-table": "^0.2.0",
|
||||||
|
"textextensions": "^5.16.0",
|
||||||
|
"through": "^2.3.8",
|
||||||
|
"tmp": "^0.0.33",
|
||||||
|
"to-fast-properties": "^2.0.0",
|
||||||
|
"to-regex-range": "^5.0.1",
|
||||||
|
"tr46": "^0.0.3",
|
||||||
|
"treeverse": "^1.0.4",
|
||||||
|
"tslib": "^2.5.3",
|
||||||
|
"tuf-js": "^1.1.7",
|
||||||
|
"type-check": "^0.4.0",
|
||||||
|
"type-fest": "^0.21.3",
|
||||||
|
"unicode-canonical-property-names-ecmascript": "^2.0.0",
|
||||||
|
"unicode-match-property-ecmascript": "^2.0.0",
|
||||||
|
"unicode-match-property-value-ecmascript": "^2.1.0",
|
||||||
|
"unicode-property-aliases-ecmascript": "^2.1.0",
|
||||||
|
"unique-filename": "^1.1.1",
|
||||||
|
"unique-slug": "^2.0.2",
|
||||||
|
"universal-user-agent": "^6.0.0",
|
||||||
|
"untildify": "^4.0.0",
|
||||||
|
"update-browserslist-db": "^1.0.11",
|
||||||
|
"uri-js": "^4.4.1",
|
||||||
|
"util-deprecate": "^1.0.2",
|
||||||
|
"validate-npm-package-license": "^3.0.4",
|
||||||
|
"validate-npm-package-name": "^3.0.0",
|
||||||
|
"vinyl": "^2.2.1",
|
||||||
|
"vinyl-file": "^3.0.0",
|
||||||
|
"walk-up-path": "^1.0.0",
|
||||||
|
"watchpack": "^2.4.0",
|
||||||
|
"wcwidth": "^1.0.1",
|
||||||
|
"webidl-conversions": "^3.0.1",
|
||||||
|
"webpack": "^5.88.0",
|
||||||
|
"webpack-cli": "^5.1.4",
|
||||||
|
"webpack-merge": "^5.9.0",
|
||||||
|
"webpack-sources": "^3.2.3",
|
||||||
|
"whatwg-url": "^5.0.0",
|
||||||
|
"which": "^2.0.2",
|
||||||
|
"which-pm": "^2.0.0",
|
||||||
|
"wide-align": "^1.1.5",
|
||||||
|
"wildcard": "^2.0.1",
|
||||||
|
"word-wrap": "^1.2.3",
|
||||||
|
"wrap-ansi": "^7.0.0",
|
||||||
|
"wrap-ansi-cjs": "^7.0.0",
|
||||||
|
"wrappy": "^1.0.2",
|
||||||
|
"write-file-atomic": "^4.0.2",
|
||||||
|
"yallist": "^4.0.0",
|
||||||
|
"yeoman-environment": "^3.19.3",
|
||||||
|
"yeoman-generator": "^5.9.0",
|
||||||
|
"yocto-queue": "^0.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"eslint": "^8.43.0",
|
||||||
|
"eslint-config-prettier": "^8.8.0",
|
||||||
|
"prettier": "^2.8.8"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://_gitea@git.alexanderk.net:3022/ak/js-recursion.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC"
|
||||||
|
}
|
||||||
24
src/fibonacci.js
Normal file
24
src/fibonacci.js
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
function fibs (number) {
|
||||||
|
const fibsArray = [0];
|
||||||
|
if (number === 0) {
|
||||||
|
return (fibsArray);
|
||||||
|
}
|
||||||
|
for (i = 1; i <= number; i++) {
|
||||||
|
if (i === 1) {
|
||||||
|
fibsArray.push(i + fibsArray[fibsArray.length - 1]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fibsArray.push(fibsArray[fibsArray.length - 2] + fibsArray[fibsArray.length - 1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(fibsArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
function fibsRec (number) {
|
||||||
|
return number === 1 ? [0 , 1] : fibsRec(number - 1).concat(fibsRec(number -1)[fibsRec(number - 1).length - 1] + fibsRec(number -1)[fibsRec(number - 1).length - 2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Using iterative fibs function:");
|
||||||
|
console.log(fibs(8));
|
||||||
|
console.log("Using recursive fibsRec function:");
|
||||||
|
console.log(fibsRec(8));
|
||||||
0
src/mergeSort.js
Normal file
0
src/mergeSort.js
Normal file
Loading…
Add table
Reference in a new issue