What is the sort algorithm sorts an array with a time slojnosti O(n * (N))?

Recently came across a problem (js). The point is that we need to create a function sort()with a temporary slojnosti O(n * (N)). Since I am far from algorithmic structures and other things associated with the algorithms - it brought me to a screeching halt. So I ask you to explain the algorithm solving this problem. And also please throw some materials where you can learn about the time complexity of the algorithms, I have not found normal.
March 23rd 20 at 18:43
2 answers
March 23rd 20 at 18:45
Solution
Bubble sort. Any algorithm of complexity O(n^2)
Read the book Grochem algorithms. There's this Big(O) time complexity
Thank you - theresia.Zemlak13 commented on March 23rd 20 at 18:48
March 23rd 20 at 18:47
According to various letters n and N refers to sorting by count. Its running time depends on the size of the array n and the number of possible values in the array, N. for example, if we want to sort an array consisting of numbers from 1 to 10, we can do it in linear time.
Cormen "Algorithms: construction and analysis" approach as a reference.

Find more questions by tags Algorithms