Proving the optimality of an algorithm
It's rarely possible to prove that an algorithm is optimal. You would have to show that your algorithm takes n steps, and for some reason solving the problem in less than n steps is impossible. Even for someone who is 100 times more intelligent than you and me together. 

An example is finding the maximum of n random numbers, which can done in n steps, and n steps are required because if you read n-1 or fewer array elements, then you can't know whether the last one is greater than all other elements or not.