23 Commits

Author SHA1 Message Date
3cae80e456 chore: merge "repulling all together (#694)"
* Create slidingWindow.js

* Rename slidingWindow.js to SlidingWindow.js

* update the commit
2021-09-22 21:40:45 +05:30
0182e31f74 Added TernarySearch Function 2021-07-24 22:48:18 +08:00
34a1eb2461 Merge pull request #333 from RitikDua/master
Added BinarySearchIterative Function
2021-05-23 14:27:08 +05:30
ca4c1a62af style: Fixed most styles (according to standardjs) 2021-05-21 11:16:11 +05:30
83b05cde15 style fixes 2020-10-31 17:53:08 +02:00
e424ba2a4f Added QuickSelect Algorithm 2020-10-31 17:33:26 +02:00
6d5b6095c0 Implemented FibonacciSearch Using JavaScript (#348)
* Implemented FibonacciSearch Using JavaScript

* Fixed Lint/test issues

* Fixed lint/test error

* FIxed Lint issues
2020-10-04 19:11:07 +05:30
e4faf7a85f Added StringSearch (#385)
* Added StringSearch

* fixed the standard issue
2020-10-03 23:34:13 +05:30
fdeda72805 Code Refacoring 2020-10-01 21:32:44 +05:30
b4648f7b93 Code Refacoring 2020-10-01 21:30:54 +05:30
c6a36987c8 Added BinarySearchIterative Function
* BinarySearchIterative Function is added
* BinarySearch function is renamed to BinarySearchRecurisve
* changes in test function
  - 3 binarySearchRecursive tests
  - 3 binarySearchIterative tests
2020-10-01 21:24:12 +05:30
a47923d210 Fixed exponentialSearch.js and interpolationSearch.js 2020-08-10 21:06:58 +03:00
6dbb849911 Added Interpolation and exponential searches in the javascript repo 2020-08-10 18:03:01 +03:00
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
7ff6b8716f editing file names 2020-05-06 21:07:49 +05:30
315be0e413 search/ (#143) 2020-05-04 18:57:53 +05:30
856dc2f63c npx standard --fix 2020-05-03 09:05:12 +02:00
f37cac8508 Fixed Whitespace, Operators, and Quotes to Comply with JSLint
I modified the whitespace in the files and changed single quotes to double quotes.

I also changed some `==` and `!=` operators to `===` and `!==` to comply with JSLint.
2019-06-27 10:41:44 -04:00
695ac54df2 Update jumpSearch.js 2019-05-11 10:13:32 +08:00
e92c4ae40a Added JumpSearch algorithm 2019-05-10 17:43:44 +09:00
9bccfacb0d Added Implementation of Binary Search 2017-08-17 16:02:59 +05:30
adbd6d7ca9 Update linearSearch.js 2017-08-17 11:10:10 +05:30
d88c04f5ee Added Implementation of Linear Search 2017-08-17 11:08:36 +05:30