Skip to content
Tim_Gao edited this page Sep 24, 2016 · 4 revisions
  1. Before starting coding, try all the corner cases first. Corner case may change the whole or part of the implementation.
    • For example, when solving Recover Binary Search Tree, I didn't take the case where two connecting tree node are swapped. And assume that two nodes are not connected or only consider the most common case where two nodes are not connected. Then that implement does not work for the corner case and cannot be easily changed to take the corner case into consideration.

Clone this wiki locally