Skip to content

Add jump search algo - #157

Merged
mgechev merged 2 commits into
mgechev:masterfrom
duffman85:add-jumpsearch-algo
Apr 7, 2020
Merged

mgechev merged 2 commits into
mgechev:masterfrom
duffman85:add-jumpsearch-algo

Conversation

@duffman85

Copy link
Copy Markdown
Contributor

This PR is add the Jump Search algorithm.

* @param {Number} seekIndex of the element which index should be found.
* @returns {Number} Index of the element or -1 if not found.
*/
function jumpSearch(sortedArray, seekIndex) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Index suffix here is a bit misleading.

Comment thread src/searching/jump-search.js Outdated
@mgechev
mgechev merged commit 9fd51ef into mgechev:master Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants