Skip to content

Commit e6533bc

Browse files
authored
Update sort.java
1 parent 464c990 commit e6533bc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Basic Codes/sort.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Sir this is merge sort time complexity to sort is O(nlogn)
22

33
import java.util.*;
4-
class MergeSort
4+
class Main
55
{
66
void merge(int arr[], int l, int m, int r)
77
{
@@ -63,12 +63,12 @@ public static void main(String args[])
6363
System.out.print("Enter ten numbers for the array");
6464
for(int i=0; i<10; i++)
6565
{
66-
array[i]=sc.nextInt();
66+
arr[i]=sc.nextInt();
6767
}
6868
System.out.println("Given Array");
6969
printArray(arr);
7070

71-
MergeSort ob = new MergeSort();
71+
Main ob = new Main();
7272
ob.sort(arr, 0, arr.length - 1);
7373

7474
System.out.println("\nSorted array");

0 commit comments

Comments
 (0)