please help me to implement such kind of sort
- by davit-datuashvili
hi i need to write sucj kind of sorting maybe it is similary to radix sort
and also (this is not homework because i created it problem myself and please if anobody can help me) problem is like this
suppose i have array int x[]=new int[]{4,5,3,2,1};
let write it into binary form
5 -0101
4- 0100
3-0011
2-0010
1-0001
i want to sort this elements by using bitwise operatos or check each bit and if less exchange it can anybody help me
for example take 5 and 4 check first rightmost bit 0==0 so continue in the 1 index also 1==1 next the same 0=0 and last one 10 it means that first element is greater then second so exchange it
please help me