If your solution is asymptotically faster than the one in the main branch.
If there is no solution to a problem in the main branch.
If your algorithm is of the same time complexity but with reduced code size. In this case, comment out the original solution & make a pull request with your solution.
If you have another method of solving the problem which is asymptotically slower than the original method then, comment your solution in the main file & make a pull request.