I came across a very difficult puzzle. What number should be placed in that last slot? I only know 16 is not the correct answer, because 11 is before 10.
You misinterpreted the puzzle. You shouldn't place a number in the last slot; you should move them around so that the numbers are in order, i.e. from the shown position you need to swap the 11 and 10. It's a type of sliding puzzle, more than a century old, known as the 15-puzzle. Half of the starting positions of this puzzle are unsolvable, as is this particular one. It's rather easy to obtain Sam Loyd's position from this one.