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

Commit0d3f5b8

Browse files
authored
Create arx.java
1 parentf021d22 commit0d3f5b8

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

‎arx.java‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
importjava.util.Scanner;
2+
classSearch{
3+
publicvoidlinearsearch(n,arr)
4+
{
5+
for
6+
}
7+
}
8+
classMain{
9+
publicstaticvoidmain(String[]args) {
10+
Scannersc=newScanner(System.in);
11+
do{
12+
System.out.println("Enter the size of the array:");
13+
n=sc.nextInt();
14+
intarr[n];
15+
for(inti=1;i,n;i++)
16+
{
17+
arr[i]=sc.nextInt();
18+
}
19+
System.out.println("MENU DRIVEN ARRAY SORT- SEARCH PROGRAM");
20+
System.out.println("ALGORITHM - Time Complexity");
21+
System.out.println("1.) Linear Search - O(n)");
22+
System.out.println("2.) Binary Search - O(logn)");
23+
System.out.println("3.) Bubble sort - O(n^2)");
24+
System.out.println("4.) Selection sort - O(n^2)");
25+
System.out.println("5.) Insertion Sort - O(n^2)");
26+
System.out.println("6.) Merge Sort - O(n logn)");
27+
System.out.println("7.) Radix sort - O(nk)");
28+
29+
intchoice;
30+
31+
choice=sc.nextInt();
32+
switch(choice)
33+
{
34+
case1:
35+
System.out.println("Searching Algorithm : Linear Search")
36+
37+
38+
}
39+
40+
}
41+
42+
43+
44+
45+
}
46+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp