I'm studying CLRS, and solving problems listed after each chapter. I'm curious about problem 1-1. That is right after Chapter 1.The question is, what is the best way to find the largest integer $n$ such that $n \lg(n) \leq 10^6$.The simplest but the longest one is substitution. Are there some elegant ways to solve this?Some explanations: $n$ is what I should calculate - total quantity of input elements, $10^6$ - time in microseconds - total algorithm running time. I should figure out $n_{\text{max}}$.
Elegant approach to finding largest $n$ such that $n\lg(n) \leq 10^6$
algorithms