Skip to content

Commit 7e7db9b

Browse files
author
AndreyGeonya
committed
fix searching namespaces
1 parent 2c40fd0 commit 7e7db9b

10 files changed

+13
-16
lines changed

src/searching/binarysearch/binarysearch.js renamed to src/searching/binarysearch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* @example
1010
*
1111
* var search = require('path-to-algorithms/src/searching/'+
12-
* 'binarysearch/binarysearch').binarySearch;
12+
* 'binarysearch').binarySearch;
1313
* console.log(search([1, 2, 3, 4, 5], 4)); // 3
1414
*
1515
* @public
16-
* @module searching/binarysearch/binarysearch
16+
* @module searching/binarysearch
1717
* @param {Array} array Input array.
1818
* @param {Number} value Value of the element which index should be found.
1919
* @returns {Number} Index of the element or -1 if not found.
File renamed without changes.

src/searching/longest-increasing-subsequence/longest-increasing-subsequence.js renamed to src/searching/longest-increasing-subsequence.js

File renamed without changes.

src/searching/subarray/maximum-subarray-divide-and-conquer.js renamed to src/searching/maximum-subarray-divide-and-conquer.js

File renamed without changes.
File renamed without changes.

src/searching/binarysearch/recursive-binarysearch.js renamed to src/searching/recursive-binarysearch.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33

44
var binarySearch = (function () {
55
/**
6-
* Binary search.
7-
*
86
* @pivate
9-
* @param {array} array Array where we should find the index of the element
10-
* @param {number} value Value of the element which index should be found
11-
* @param {number} left Left index
12-
* @param {number} right Right index
13-
* @returns {number} index The index of the element or -1 if not found
14-
*
7+
* @param {Array} array Array where we should find the index of the element
8+
* @param {Number} value Value of the element which index should be found
9+
* @param {Number} left Left index
10+
* @param {Number} right Right index
11+
* @returns {Number} index The index of the element or -1 if not found
1512
*/
1613
function recursiveBinarySearch(array, value, left, right) {
1714
if (left > right) {
@@ -36,11 +33,11 @@
3633
* @example
3734
*
3835
* var search = require('path-to-algorithms/src/searching/'+
39-
* 'binarysearch/recursive-binarysearch').binarySearch;
36+
* 'recursive-binarysearch').binarySearch;
4037
* console.log(search([1, 2, 3, 4, 5], 4)); // 3
4138
*
4239
* @public
43-
* @module searching/binarysearch/recursive-binarysearch
40+
* @module searching/recursive-binarysearch
4441
* @param {Array} array Input array.
4542
* @param {Number} value Value of the element which index should be found.
4643
* @returns {Number} Index of the element or -1 if not found.

test/searching/binarysearch/binarysearch.spec.js renamed to test/searching/binarysearch.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
var binarySearch =
4-
require('../../../src/searching/binarysearch/binarysearch').binarySearch;
4+
require('../../src/searching/binarysearch').binarySearch;
55

66
describe('Binary search', function () {
77

test/searching/longest-increasing-subsequence/longest-increasing-subsequence.spec.js renamed to test/searching/longest-increasing-subsequence.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

33
var longestSubsequence =
4-
require('../../../src/searching/' +
5-
'longest-increasing-subsequence/longest-increasing-subsequence')
4+
require('../../src/searching/' +
5+
'longest-increasing-subsequence')
66
.longestSubsequence;
77

88
describe('longest subsequence', function () {

test/searching/subarray/maximum-subarray-divide-and-conquer.spec.js renamed to test/searching/maximum-subarray-divide-and-conquer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
var maxSubArray =
4-
require('../../../src/searching/subarray/maximum-subarray-divide-and-conquer')
4+
require('../../src/searching/maximum-subarray-divide-and-conquer')
55
.maxSubarray;
66

77
describe('Maximum subarray implemented with divide and conquer', function () {

0 commit comments

Comments
 (0)