I need to furnish an identical function to asort($list) of PHP. However, I am not sure how to handle a mix of strings and numbers while sorting.
I could do something like
foreach($list as $value)
if pos > pos+1 swap
a simple bubble sort, but how about an array(1,2, this, 5, is, consufing)?
You can sort this with bubble sort?
Thanks a lot!
I could do something like
foreach($list as $value)
if pos > pos+1 swap
a simple bubble sort, but how about an array(1,2, this, 5, is, consufing)?
You can sort this with bubble sort?
Thanks a lot!