Skip to content

Commit

Permalink
remove gpg dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
yijunyu committed Jun 10, 2019
1 parent b10eb53 commit d60af55
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 32 deletions.
55 changes: 24 additions & 31 deletions datasets/github_java_10/4/3.java
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
class InsertionSort
{
void sort(int arr[])
{
int n=arr.length;
for(int i=1;i<n;++i)
public static void insertionSort()

{
int key=arr[i];
int j=i-1;
while(j>=0&& arr[j]>key)
{
arr[j+1]=arr[j];
j=j-1;
}
arr[j+1]=key;
}
}
int i = 1;

static void printArray(int arr[])
{
int n=arr.length;
for(int i=0;i<n;++i)
System.out.print(arr[i]+" ");
System.out.println();
}
while

(i < arr.length)
{
int j = i;
while

(j > 0)
{
if (arr[j].key < arr[j-1].key)
{
InsertionSortNode tmp = arr[j];
arr[j] = arr[j-1];
arr[j-1] = tmp;
}
j = j - 1;
}
i = i + 1;
}
}

public static void main(String args[])
{
int arr[]={12,11,14,5,6};
InsertionSort insertSort=new InsertionSort();
insertSort.sort(arr);
printArray(arr);
}
}

1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ flatast==0.0.14.post3
flatbuffers==1.10
gast==0.2.2
ggnn==0.0.7.post44
gpg==1.13.0
grpcio==1.18.0
h5py==2.9.0
idna==2.8
Expand Down

0 comments on commit d60af55

Please sign in to comment.