E
E
Evgeny Voronov2021-01-13 12:17:00
Algorithms
Evgeny Voronov, 2021-01-13 12:17:00

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

6 answer(s)
A
Antony, 2021-01-13
@evg_voronov

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.

U
Uno, 2021-01-13
@Noizefan

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

V
Veniamin, 2021-01-13
@VenyaNikolaev

Where there is work with different data, there are a lot of such areas

A
Alexander Skusnov, 2021-01-14
@AlexSku

Databases commonly use sorting and filtering.

X
xmoonlight, 2021-01-14
@xmoonlight

Rating table output: richest, smartest, most popular, movie rating, game rating, user rating.
PS: It's strange that no one named these options.)))

V
Vyacheslav Sad-Zhabka, 2021-02-06
@wakwist

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 question

Ask a Question

731 491 924 answers to any question