Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit398b682

Browse files
Ankush263github-actions
and
github-actions
authored
merge: Add test case to the Exponential Search Algorithm (TheAlgorithms#1040)
* Add test case to the Exponential Search Algorithm* Updated Documentation in README.mdCo-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parentd3cec8b commit398b682

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎Search/test/ExponentialSearch.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import{exponentialSearch}from'../ExponentialSearch'
2+
3+
test('The Exponential Search of the Array [2, 3, 4, 10, 40, 65, 78, 100] is 6 where the value = 78',()=>{
4+
constarr=[2,3,4,10,40,65,78,100]
5+
constvalue=78
6+
constresult=exponentialSearch(arr,arr.length,value)
7+
expect(result).toEqual(6)
8+
})
9+
10+
test('The Exponential Search of the Array [2, 3, 4, 10, 40, 65, 78, 100] is -1 where the value = 178',()=>{
11+
constarr=[2,3,4,10,40,65,78,100]
12+
constvalue=178
13+
constresult=exponentialSearch(arr,arr.length,value)
14+
expect(result).toEqual(-1)
15+
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp