So I've an expression
max(k-1, n-k)
Now, the book I'm reading is Introduction to Algorithms and the authors have deduced the following cases.
I've no idea about how to approach this problem. I tried looking at the function to calculate max of two functions, but from that too, the problem seem to be unapproachable.
Is the solution purely based on intuition? Or there is any mathematical approach one can always rely upon, to solve such problems?
Sorry for the naive question.
