So, Everbody is familiar with constant O(1)
or Linear O(N)
Space Complexity.
But I have a question that, is there any case when Space Complexity of an Algorithm is proportional to O(NLogn)
or O(N^2)
. If that's possible, what is the advantage of it.
P.S.- I have researched over various sites but didn't got any satisfactory solution.