Answer the question
In order to leave comments, you need to log in
In what real practical problems are sorting algorithms used?
It is necessary to explain to schoolchildren in which tasks sorting algorithms are used. REAL EXAMPLE. Only not about excel and the directory of the phone book. I would be grateful for a data set from a real problem that contains several hundred elements that need to be sorted.
Answer the question
In order to leave comments, you need to log in
Any entities that have characteristics that can be ranked according to the principle "more/less", "before/after", etc.
Goods in the store (sorted by price, year of manufacture, dimensions, weight, delivery time)
Students in the university (sorted by average score, number of absenteeism, IQ level, number of tails, full name)
Cities / countries (sorted by population, birth rate, GDP, GDP per capita, incidence of covid, influenza, brain cancer)
Astronomical objects (mass, size, density, albedo, orbital parameters)
Telephone directory (I don’t know why you don’t like this example)
Anything.
Take any public data (google Public dataset) of any kind and sort it by any criteria you like.
Well, for example, I recently made a world map with a number of certain data for each country. And I needed to paint the top 10 countries in certain colors.
It turns out that I sorted the array first))
Well, in total there are 197 countries on Earth
Where there is work with different data, there are a lot of such areas
Rating table output: richest, smartest, most popular, movie rating, game rating, user rating.
PS: It's strange that no one named these options.)))
Obviously, where you need to sort the data :) The
question is different: is it advisable to write your own sorter if all popular programming languages and databases have their own well-written sorter? As a rule, the answer is "no".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question