Sorting Algorithms

I know all the theorem about the sorting algorithm and I know them pretty well. However, I found it really hard to put the ideas into code.

Is there any tricks I can convert my ideas into code? Or just practice makes perfect?

Please can i have an example of all this methods including its algorithms. Thank you

This article is great! At this moment i try working and doing research for my thesis. Our Professor gives me a problem of enhancing sort algorithms. Now, I have done my introduction and the next will be studying on the slowest sort algorithm, the Bubblesort; and the fast sort algorithm, the Quicksort and our task is to enhance the Bubblesort and after enhancing it, i need to compare it to the Quicksort. At this time i studying more on time complexity. Thank You.

In really huge huge data (integer) which sorting algorithm is the best? Quicksort or counting sort?

Je Suis Kier Morgan

Hi this didnt help plz explain moar. Thanks shoutout to pewdiepie he helped me threw alot.

-IO_Kieran_OI

LaTeX: $$e=mc^2$$

insertion sort using binary method.

import java.util.ArrayList;
import java.util.Scanner;
public class hash{
public static void main(String args[])
{
ArrayList a=new ArrayList();

Scanner sc=new Scanner(System.in);
int p,c,d,m;
while(true){
p=sc.nextInt();
c=0;d=a.size()-1;
m=(c+d)/2;
if(a.size()==0)
a.add§;
else if(a.size()==1)
{
if(a.get(0)>p)
a.add(0,p);
else
a.add§;
}

else if(a.size()>=2)
while(true)
{
if(a.get(0)>p)
{a.add(0,p);break;}
if(a.get(a.size()-1)0 && a.get(m)>=p && a.get(m-1)<=p)
{a.add(m, p);break;}
if(a.get(m)=p && m=p )
{a.add(m, p);break;}
if(a.get(m)<=p && m==(a.size()-1))
{a.add(m+1, p);break;}
if(m==0 && a.get(m)=p && m==(a.size()-1))
{a.add(m, p);break;}
if(a.get(m)>=p && a.get(m-1)>=p && m>0)
{d=m;m=(c+d)/2;}
if(a.get(m)<=p && a.get(m+1)<=p && m<(a.size()-1))
{c=m;m=(c+d)/2;}
}
System.out.println("the list is "+m+" "+a+" "+a.size());
}
}
}

in worst case it will be O(n^2)

Can i have links plz???

what are the difference between merge sort, quick sort and bubble sort ??

which algorithm has the best run time complexity

I was just trying to send links to people that were confused about bubble and selection but they got removed

How can we meet Kier Morgan

can any one tell me , if the given array is in decreasing order and we need to arrange in increasing order,which sorting is the best???

"can any one tell me , if the given array is in decreasing order and we need to arrange in increasing order,which sorting is the best???"
For this Timsort is the best. https://en.wikipedia.org/wiki/Timsort

Kier Morgan can I have your helpful comments plz???

why would u take me comments down i am helpsful why

ITS A PRANK! jk. Follow up. I reread this in hebrew and i understand it. thanks.

Megalith3000

Hi, i have been trying to use bubble sort in my c++ code. thanks for any help. Shoutout to megalegoprod

-georgeasawrusrex

I❤️algorithms

This no help. Please go on in deutsch if any oen speeke deutsche.