Answer the question
In order to leave comments, you need to log in
Fastest algorithm to find the largest value in an unsorted array?
Perhaps a linear search? But it is not used in production, as far as I know. Then, Search with sorting? But after all, time is also spent on sorting, and it turns out that it is inferior in speed to a linear one?
Answer the question
In order to leave comments, you need to log in
in unsorted array
(If it happened!)
In 2 consecutive passes.
1. By the amount of data in each element of the array (the amount of memory occupied by the data).
2. According to the data itself, in the array elements with the largest amount of memory occupied.
This will be much faster than directly comparing the data by direct enumeration.
In general, such cases as the appearance or presence of an unsorted array indicate that the architect of a software solution / complex does not know how to work with data at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question