forked from FatimaAlazazi/DataStructure2021
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInsertionSort.java
More file actions
26 lines (25 loc) · 762 Bytes
/
InsertionSort.java
File metadata and controls
26 lines (25 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.util.Scanner;
public class RemoveElmentFromArray{
static int [ ] a ={2,4,5,6,3,1};
static Scanner in =new Scanner(System.in);
static int [] temp=new int[a.length-1];
static public void print(){
System.out.print("");
for (int i = 0; i < a.length ; i++) {
if (i==a.length-1);
System.out.print(a[i]+"");
else
System.out.print(a[i]+"");
}
}
static public void PrintRemovedArray()
{
System.out.print("");
for (int i = 0; i < temp.length ; i++) {
if (i==temp.length-1)
System.out.println(temp[i]+"");
else
System.out.println(temp[i]+"");
}
}
}