Skip to content

Instantly share code, notes, and snippets.

@peijiehu
Created June 24, 2017 07:27
Show Gist options
  • Save peijiehu/700e9f5988d6fb9bd9cb56e268935998 to your computer and use it in GitHub Desktop.
Save peijiehu/700e9f5988d6fb9bd9cb56e268935998 to your computer and use it in GitHub Desktop.

Try the following approaches:

  1. Simplify the problem, try solving the simpler/sub problem first, see if the same technique can be applied or if we can build it up to the bigger problem, this usually implies Dp.
  2. Brute force approach, have a solid but probably slow solution first, then start optimizing from there.
  3. When the solution seems complex, don't have to come up with algo for every piece, instead, mock some algo with simply a empty function, and implement it later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment