Thoughts of LeetCode Stage 1. Start

Posted on Updated on

Start points are Power of Two, strStr, Plus One, Climb Stairs, and Reverse Int.

Some thoughts about the special cases…

  1. special values: 0, 1, null
  2. special conditions: negative or positive
  3. boundary: +/- 1?
  4. overflow: use key word like Integer.MAX_VALUE / MIN_VALUE
  5. size incomparable: sub size larger than sup size

Some thoughts on program design:

  1. flag signals for condition control
  2. recursion
  3. dynamic programming
  4. bitwise or logical operation

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s