390 Commits

Author SHA1 Message Date
729b2d6c8c updating DIRECTORY.md 2020-06-28 07:10:59 +00:00
0c3fd105c8 Rename DFS.js to DepthFirstSearch.js 2020-06-28 12:40:36 +05:30
ef5566f6a6 Update BinarySearch.js (#209)
* Update BinarySearch.js

The old algorithm didn't work, I believe for two main reasons:
1 -  Number.MAX_VALUE is not a valid array index as it is used to represent the highest possible value in javascript (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE);

2 - splice() is not a pure function, every time it is called it has the side effect of modifying the original array (https://www.w3schools.com/jsref/jsref_splice.asp) ;

So I rewrote the algorithm, it now returns an index ( -1 if not found ) and it works both on numbers and on strings.

* Update BinarySearch.js

Style change

* Update BinarySearch.js

Style change

* Update BinarySearch.js
2020-06-28 12:29:19 +05:30
744291b7f0 updating DIRECTORY.md 2020-06-26 15:33:05 +00:00
40f91ece25 Added n-queen (#206) 2020-06-26 21:02:40 +05:30
129ec51861 bugfix (#207)
Push should be converted to hexout. unshift
2020-06-26 19:27:39 +05:30
4d4f668451 updating DIRECTORY.md 2020-06-26 05:10:30 +00:00
a70dfe9b7a Added backtracking (sudoku) (#205)
* Added backtracking (sudoku)

* Coverted into class based program
2020-06-26 10:40:03 +05:30
9e414b7896 updating DIRECTORY.md 2020-06-24 05:55:25 +00:00
4203835cd6 Added Monte Carlo Pi Approximation (#201)
* Added Monte Carlo Pi Approximation

* Added comments
2020-06-24 11:25:01 +05:30
d8eee0c70d Added .gitignore (#203) 2020-06-24 11:24:19 +05:30
3725d95d95 updating DIRECTORY.md 2020-06-23 04:48:01 +00:00
4be7a85fd3 Added an XOR cipher (#135)
* Added an XOR cipher

* Rename xor_cipher.js to XORCipher.js

* Update XORCipher.js

Co-authored-by: vinayak <itssvinayak@gmail.com>
2020-06-23 10:17:44 +05:30
3874ec3778 updating DIRECTORY.md 2020-06-23 04:12:52 +00:00
269157f65b Added DFS Algorithm (#199)
* FibonacciSearch

* FibonacciSearch

* Depth First Search Algorithms

* Depth First Search Algorithms

* Depth First Search Algorithms

* Depth First Search Algorithms
2020-06-23 09:42:36 +05:30
fa1879c654 updating DIRECTORY.md 2020-06-21 17:19:07 +00:00
b2b1ad3724 update (#197)
Co-authored-by: itsvinayak <itssvinayak@gmail.com>
2020-06-21 22:48:52 +05:30
ca2170d44d updating DIRECTORY.md 2020-06-21 16:38:45 +00:00
412995ac09 Added Web-Programming (Open Weather Maps data fetch) (#196)
* Added Web-Programming (Open Weather Maps data fetch)

* update

Co-authored-by: itsvinayak <itssvinayak@gmail.com>
2020-06-21 22:08:29 +05:30
78262df0a2 updating DIRECTORY.md 2020-06-21 05:10:50 +00:00
b8fecdd68e Merge branch 'jonathangomz-patch-2' 2020-06-21 10:40:00 +05:30
0bb7942a40 Create RomanToDecimal.js 2020-06-21 10:39:32 +05:30
c9b3d25c53 Create RomanToDecimal.js
Conversion from Roman numeral system to decimal
2020-06-21 10:37:23 +05:30
5f961ba898 updating DIRECTORY.md 2020-06-20 04:57:06 +00:00
37ab4b0752 rename and reorganizing (#194) 2020-06-20 10:26:44 +05:30
656391bbf5 updating DIRECTORY.md 2020-06-20 04:44:46 +00:00
7e93136075 Dijkstras algorithm (#161)
* Renaming files according to naming convention

* Added Dijkstra's Algorithm
2020-06-20 10:14:31 +05:30
688043eb32 updating DIRECTORY.md 2020-06-20 04:39:28 +00:00
f75549f6d7 Created DijkstraSmallestPath.js in Graphs (#185)
* Created DijkstraSmallestPath.js in Graphs

* Deleted DijkstraSmallestPath.js from Maths
2020-06-20 10:09:07 +05:30
5ba1cffb20 Optimizing maxSum updation (#186)
* Optimizing maxSum updation

compare maxSum with cummulativeSum only when cummulativeSum is greater than zero

* Fixing linter error
2020-06-12 18:04:18 +05:30
bc3d69dd12 updating DIRECTORY.md 2020-05-27 16:56:48 +00:00
1a263d00d4 Merge pull request #179 from ChaymaJaziri/patch-2
HexToRGB
2020-05-27 22:26:23 +05:30
f5054ac93d Update HexToRGB 2020-05-27 22:24:44 +05:30
aca7d80cdb HexToRGB 2020-05-25 01:41:50 +01:00
3a7df561cb updating DIRECTORY.md 2020-05-23 06:02:02 +00:00
b2f6471b89 feat: adjust swap grammar (#175)
* feat: adjust swap grammar

* fix: grammar
2020-05-23 11:31:41 +05:30
e9d4da4ef5 updating DIRECTORY.md 2020-05-22 03:14:48 +00:00
735f173fc2 Number of Subset equal to given sum (#174)
* Number of Subset equal to given sum

* Update and rename Number of Subset equal to given sum to NumberOfSubsetEqualToGivenSum.js

* Update NumberOfSubsetEqualToGivenSum.js
2020-05-22 08:44:22 +05:30
9000e1caaa Re-orgainze files and folders in the repository (#172)
* Re-orgainze files and folders in the repository

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-18 11:10:07 +05:30
e4f02a4528 updating DIRECTORY.md 2020-05-18 04:46:21 +00:00
cb0aff9ec2 Add Graph BFS algorithm (#169)
* Add Graph BFS algorithm

* updating DIRECTORY.md

* Fix failing tests

* updating DIRECTORY.md

* Fix further failing tests

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-18 10:15:53 +05:30
25dac3a1e3 updating DIRECTORY.md 2020-05-13 12:29:49 +00:00
8fca284103 BogoSort.js: Simplify Array.isSorted() and add doctests
BogoSort.js: Simplify Array.isSorted() and add doctests
2020-05-13 14:29:26 +02:00
3432aded27 updating DIRECTORY.md 2020-05-12 23:31:32 +00:00
4913d5fe14 npx doctest Sorts/BogoSort.js Sorts/BucketSort.js 2020-05-13 01:31:00 +02:00
5331e55dfc updating DIRECTORY.md 2020-05-12 23:29:03 +00:00
215005325c Update nodejs.yml 2020-05-13 01:28:46 +02:00
cafb7e55b4 updating DIRECTORY.md 2020-05-12 23:28:15 +00:00
050f56b190 Add doctest to BucketSort.js 2020-05-13 01:27:55 +02:00
f59062ae1a Ready for review 2020-05-13 00:50:23 +02:00