GATE CSE
First time here? Checkout the FAQ!
x
0 votes
70 views
You have 10000 dates of the form YYYYMMDD.Which sorting method is more efficient?
asked in Algorithms by Veteran (53.2k points)   | 70 views
radix sort will be best
Why?
radix sort will be compared along the columns which makes it easier, in databases date datatype sorting is also done through radix sort when u say created_date order by desc

2 Answers

0 votes
sorting method which uses individual digits is better than any comparison sort.
answered by Junior (607 points)  
0 votes
i think radix sort is more efficient because  radix sorts use lexicographic order, which is suitable for sorting strings, such as words, or fixed-length integer representations.
answered by Active (1.3k points)  


Top Users Apr 2017
  1. akash.dinkar12

    3660 Points

  2. Divya Bharti

    2580 Points

  3. Deepthi_ts

    2040 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Debashish Deka

    1614 Points

  7. Shubham Sharma 2

    1610 Points

  8. Prashant.

    1492 Points

  9. Arjun

    1472 Points

  10. Arunav Khare

    1464 Points

Monthly Topper: Rs. 500 gift card

22,088 questions
28,063 answers
63,298 comments
24,173 users