The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
101 views
You have 10000 dates of the form YYYYMMDD.Which sorting method is more efficient?
asked in Algorithms by Veteran (70.4k points) | 101 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 Active (1.3k 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)

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,156 questions
36,980 answers
92,147 comments
34,822 users