I have read the solution on the editorial for this problem but I dont understand how it came with this part on the code:
for (int x = 1; x < n; ++x) {
for (int y = 0; y <= k - 1; ++y) {
result = Math.min(result, Math.max(F(x, y), F(n - x, k - 1 - y)) + 1);
}
}
Can anyone help me with this. Thanks!