Attempted to solve the maximal rectangle problem, but didn't get the problem at all and solved a wrong problem.