1548 Commits

Author SHA1 Message Date
81c771b901 merge: Improved LRUCache (#953)
* feat: added new validation test casses & methods

* style: formated with standard

* feat: added parse method & test cases

* docs: added js docs

* chore: added default import export
2022-03-27 12:07:54 +05:30
55da7a1d7c merge: Add test case to HeapSort Algorithm (#947) 2022-03-24 21:50:57 +05:30
73efc89d29 merge: Fix GnomeSort algorithm and Add test case to it (#948) 2022-03-24 21:50:39 +05:30
532cf3e613 merge: Add test case to FlashSort algorithm (#946) 2022-03-24 21:50:21 +05:30
233ec596dc merge: Add Graph3 (add DFS in Iterative Way) (#944)
* Add Graph3 (add DFS in Iterative Way)

* Remove example code and add test code (Graph3)

* Remove redundant code (like return undefined)
2022-03-24 12:42:26 +05:30
699146fb4e merge: Add test case to secondLargestElement Algorithm (#945) 2022-03-23 22:13:09 +05:30
ecf7cf9fe3 merge: Add test case to countingSort algorithm (#943) 2022-03-22 20:26:55 +05:30
9681688797 merge: Add CheckExceeding function (#907)
* feat: add checkExceeding function

* test: add test cases of checkExceeding func

* test: add more not increasing words
2022-03-22 14:37:42 +05:30
d246958a4d merge: Added explicit cache feature & optional parameter (#941) 2022-03-22 14:36:21 +05:30
ad68c63947 merge: Added new clean LFUCache class (#939)
* feat: added new clean LFUCache class

* fixed: resolved spell mistake & added test casses
2022-03-21 22:13:45 +05:30
9d2a7f1639 merge: Add test case to ConvexHullGraham Algorithm (#938) 2022-03-21 21:49:45 +05:30
9f7ed56290 merge: Remove duplicate helper functions in cache tests. (#933)
* refactor: added one implementation of fibonacciCahce

* chore: move union function

* chore: renamed the cacheTest file
2022-03-20 13:06:13 +05:30
bb2338216e merge: Add test case to RGBToHex & RailwayTimeConversion algorithm (#935) 2022-03-19 21:20:03 +05:30
5302002197 merge: Add test case to LowerCaseConversion (#934) 2022-03-18 21:13:19 +05:30
e33503fc58 merge: Add test case to DecimalToBinary,DecimalToOctal & OctToDecimal (#932) 2022-03-18 13:57:40 +05:30
92a2f6d106 merge: added @babel/eslint-parser (#931)
* feat: added @babel/eslint-parser

* fix: added package lock
2022-03-17 12:28:44 +05:30
ffa4846994 merge: Add FindMinIterator algorithm (#928)
* FindMinIterator

Do the `standard` thing.

Rename `FindMin` to `FindMinIterator`

Rename to `FindMinIterator`

Pull `FindMin` from `master`

* Remove these separator comments.

Co-authored-by: RuSaG0 <mirzoev-ruslan-2000@mail.ru>
2022-03-16 17:31:25 +05:30
19924251be merge: Add test cases to ArbitraryBase, DateToDay & DateDayDifference Algorithm (#929) 2022-03-16 17:10:31 +05:30
a545f76669 merge: Add test case of SquareRoot function (#926) 2022-03-15 20:39:34 +05:30
0924f1c8c9 merge: Improved abs function (#923)
* feat: added validation, test codes

* chore: remove useless words
2022-03-15 17:41:50 +05:30
80cea0884b merge: Add testcases of BinaryCountSetBits function (#922) 2022-03-15 14:39:18 +05:30
7f479b8ced merge: consistent list syntax in CONTRIBUTING.md (#921)
* feat: add style and run scripts on pre-commit hooks

* Update package-lock.json

* Update CONTRIBUTING.md

* Add period at the end of lines
2022-03-12 10:30:46 +05:30
da6c22704e merge: refactor isEven function (#920)
* refactor: formated docs and functions

* refactor: format all test codes
2022-03-11 22:16:02 +05:30
4f6fe1975c merge: resolve example mistake (#919) 2022-03-10 22:25:06 +05:30
5198af80a9 merge: Run "style" and "test" scripts automatically when committing new changes (#918)
* feat: add style and run scripts on pre-commit hooks

* Update package-lock.json
2022-03-09 20:41:14 +05:30
35ba618355 merge: Added replace method to Upper (#916)
* feat: added replace method

* resolve: fix algo
2022-03-05 14:40:39 +05:30
00f593662b merge: Add alternative implementation for InsertionSort and relative test. Add additional algorithm description (#915)
Co-authored-by: Andrea Tota <tota@qi4m.com>
2022-03-04 19:41:37 +05:30
98c46b4d9e merge: Improved IsOdd function (#914)
* refactor: used Boolean function for conversion

* feat: added one more function and test cases

* test: refactor test case & fixed var names

* chore: fixed test placeholder
2022-03-04 16:34:33 +05:30
cc55dabb4b merge: Updated pull_request_template (#913) 2022-03-02 21:58:41 +05:30
6656ece534 merge: Improved Memoize function (#912)
* feat: improved memoize function

used Map instead of object & used the JSON.stringfy method for generate a valid string as a key

* docs: modified documentation

* style: format with standard

* docs: modified stringify doc

* refactor: remove two repetition implementation
2022-03-02 14:26:16 +05:30
eb748ae78d merge: Fixed wordOccurrence algorithm (#909)
* resolved: upgrade the algoritm

* docs: add js doc
2022-03-02 10:43:01 +05:30
378d4abebc merge: Upgraded hexToBinary function (#910)
* feat: used js object intead of switch

* pref: optimzed the algo with regex & replace method

* feat: add hex validation with test case

* feat: add type validation

* chore: fix grammar mistake

* docs: add binLookup comments
2022-03-02 09:40:07 +05:30
ab06131656 merge: Improved Pow function (#911)
* feat: add negative power option

* docs: add js doc for powOn function

* feat: add PowFaster with faster algorithm, complexity O(logN)

* chore: rename to exponent

* chore: rename fixed

* style: formated with standard
2022-03-02 09:06:40 +05:30
e8de031539 merge: Improved pangram algorithm using regular expressions (#906)
* feat: used regex instead of Set

* docs: add js doc

* docs: add comments of workable code

* style: format via standardJs

* docs: add details explanation of pangram regex

* docs: add example

* feat: add two implemetaion of

The first implementation with regex and second via HashSet & add the test code for both

* chore: add QNA format of **Pangram**

* style: format with standardJs

* resolve: removed 'Ans'
2022-02-28 10:59:09 +05:30
d466be977e merge: Upgrade checkAnagram function & Fixes (#902)
* pref: optimize the algo via reduce & replace method

* feat: add TypeError for invalid types

* test: upgrade test case for invalid types

* docs: add js doc

* test: modify the case-sensitive test case

* pref: Optimize algo & add case-insensitive mode

* style: format with standard style

* docs: fix the js doc

* docs: rename function name & add comments

* feat: add chackAnagramViaMap function

* test: add test case for checkAnagramViaMap func

* fix: remove **Via** from functions name

* style: fix alignment of js doc

* chore: grammar fix

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2022-02-25 21:56:30 +05:30
0178efd8df merge: Algorithm to calculate the Arithmetic Geometric Mean (#897)
* Create ArithmeticGeometricMean.js

* Finally added the test script for AGM

* Better doc, and corrected some formatting

* Fixed syntax typos

* Added more tests and made FP comparison more "loose"

* Patched bugs

* Fixed-0 bug

* Again, tried to fix minus zero

* Finally fixed all bugs (probably)

* Fixed style (probably)

* Fixed style

* Fixed all style
2022-02-24 16:15:56 +05:30
be15d08b4a merge: replaced constructor function with es6 class syntax (#900)
* replaced constructor function with es6 class syntax

* formatted code with standard.js
2022-02-23 16:16:45 +05:30
8bf29fe17c merge: Optimize the space complexity of the fibonacci algo (#899)
* docs: update js doc

* feat: add number type validation condition

* pref: Optimize space complexity

remove the Array from the algo and used two flag varible to calculate last two numbers & optimize the sapce complexity O(n) to O(1)

* test: add test case for invalid types
2022-02-22 16:20:46 +05:30
743b3179f7 merge: Corrected JSdoc typo (#898)
The URL in the Wikipedia link had an extra "h" in the URI Scheme (the part that specifies the protocol, usually `https`). I removed the duplicate "h" and made it into a single "h", now the link works
2022-02-21 16:28:40 +05:30
dbc98d096b merge: Bubble Sort enhancements for nearly sorted or sorted array, added test cases and documentation (#895)
* BubbleSort enacements for nearly sorted or sorted array and added test cases

* BubbleSort enacements for nearly sorted or sorted array and added test cases

* Bubble sort requested changes solved

* standard js style issue fixed
2022-02-19 17:53:54 +05:30
041918d7b7 merge: Upgrade Lower function (#894)
* docs: update the js doc

* pref: Optimize algo via regex

ignore the useless traverse in best case via regex and String.prototype.replace

* test: add some new test cases

* fix: styled with standard

* refactor: remove useless variable
2022-02-19 17:08:55 +05:30
29a3ab73bc merge: Iterator and log methods added for linked lists (#891)
* iterator, log methods added in SL

* iterator, log methods added in DL

* test file added for DoublyLL

* format issue fix
2022-02-18 20:13:45 +05:30
68ca0ceeef merge: optimize the countVowels algo (#886)
* pref: optimize the count vowels algo

simplify the algo by using regex and String.prototype.match method, and modified the JS Doc

* fix: resolve all requests

* pref: optimize the algo by regex

ignore the useless traverse in best case by the help of regex and String.prototype.replace method

* test: add four new test cases

* Revert "test: add four new test cases"
This reverts commit 4609833da146beafe839682d7558edf9f64c96fc.

* style: fromat with standard js
2022-02-17 17:30:04 +05:30
9911410e70 merge: Implement Add Two Numbers (Linked List) (#888)
* Implement Add Two Numbers (Linked List)

* Implement Add Two Numbers (Linked List)

* Implement Add Two Numbers (Linked List)

Co-authored-by: Shakil Ahmmed <shakilahmmed@ShakilAhmmeds-MacBook-Pro.local>
2022-02-17 17:29:36 +05:30
c9701e8a4c merge: Improving the coding standard for AvLTree Data Structure (#882)
* Improving the coding standard for AvLTree Data Structure

* Test case creation for AVLTree

~ Created test cases for AVL Tree
~ Indentation fix for AVLTree.js

* Auto-update DIRECTORY.md

* Change in logic for data list

* Style fix based on standard.js

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-02-17 14:08:26 +05:30
6bd2ac682d merge: Decrease time period for marking an issue stale (#885)
* chore: mark stale after 7 days of inactivity

* Auto-update DIRECTORY.md

* chore: length info provided in comments

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-02-16 19:26:34 +05:30
833d05d8d0 merge: binarySearch (#884)
* required, optional param left-to-right approch in BS

* base case return early to avoid nested if block

* codes formated with standard.js
2022-02-16 14:24:32 +05:30
c496925d25 merge: rename SinglyLinkList to SinglyLinkedList (#881) 2022-02-14 13:49:10 +05:30
31b06c9abe merge: Let traverseLevel return early if node is null (#878) 2022-01-24 15:13:48 +05:30
7dd99c1c03 merge: chore(deps): bump node-fetch from 2.6.1 to 3.1.1 (#877)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 3.1.1.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v3.1.1)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-23 16:03:35 +05:30