Our team always used to hit the edge cases quickly... Some technologies might be there for years, but when we start hacking, we'll immediately come across a situation that might faced only by veterans. Our experience with Delphi (one of the coolest technologies), ASP.NET MVC, MonoRail/ASP.NET, iPhone/Android programming proved that. This time, with another new technology... fingers crossed...
This is related to PHP's array .
An array has number of elements. All elements are integers and unique, which means there is no repetitive integers.
(e.g.) $foo = array(7, 5, 9, 13, 2, 8);
You have to sort the array, provided:
You should scan the elements only once. You're not allowed to compare the elements when sorting. (i.e., you're not supposed to use any comparison operators) Sorted resultant array may not be the source array.
How will you do that?
Comments