Friends Sort Algorithm
Friends Sort Algorithm
Hina Gull
INTRODUCTION
_____________________________
978-1-4244-4520-2/09/$25.00 2009 IEEE
II.
5.
6.
7.
8.
ALGORITHM:PSEUDO CODE
FRIENDSSORT(List)
First:= 0
Last:= LENGTH[LIST]
Mid:= LENGTH[LIST]/2
WHILE k < LAST/2 || j> LAST/2
l:=k+1
m=j-1
WHILE l< LAST-1 || m>FIRST
If (LIST[k] > LIST [l])
LIST[k]=LIST[l]
LIST[l]=LIST[k]
If (LIST[j] < LIST [m])
LIST[j]=LIST[m]
LIST[m]=LIST[j]
l++
m- If (LIST[mid] < LIST [k])
LIST[mid]=LIST[k]
LIST[k]=LIST[mid]
If (LIST[mid] > LIST [j])
LIST[mid]=LIST[j]
LIST[j]=LIST[mid]
K++
J--;
V.
ACKNOWLEDGMENT
We acknowledge the support and contribution from our
loving and caring families and friends in continuing the
education and research. With their moral and financial
support, we are in higher education, which encourages us to
write this research for the ease of human kind. Thank you all.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]