My Math Forum Sorting n real numbers in O(n), when number of digits is bounded

 Applied Math Applied Math Forum

 April 10th, 2016, 01:55 AM #1 Member   Joined: Mar 2015 From: USA Posts: 34 Thanks: 1 Sorting n real numbers in O(n), when number of digits is bounded I need to explain how to modify radix sort, in order to sort n real numbers, when every number has O(1) digits. General and short description is enough. I thought of making the numbers to have same number of digits left and right to the decimal point, then sort with radix sort only the negative numbers and make sure they will be afterwards in the beginning of the array (before the non-negative numbers, can be implmented at O(n)). Finally- sort the rest of the numbers with radix sort. Is there anything wrong with that?

 Tags bounded, digits, number, numbers, real, sorting

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post karanv10111 Advanced Statistics 2 June 2nd, 2014 12:45 PM grangeeducation Elementary Math 2 May 29th, 2014 01:35 AM ricsi046 Number Theory 2 November 10th, 2013 05:31 AM Albert.Teng Algebra 2 July 15th, 2012 08:14 PM brangelito Algebra 1 June 13th, 2010 08:29 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top