* | Search the current word |
- Consider using HashMap when comparing two strings or arrays.
- When handling string problems, ask if it is ASCII. Use an array of length 256 if it is.
- When comparing two strings or arrays, sort them first.
- Using StringBuffer for the temporary result for string concatenate.
- Prepend a dummy node for linked list problems.
- Remember integer might be negative!
- Computer cannot accurately represent float/double, use epsilon for equality check.
- Interval intersection: 1) sort by start point, binary search the end point 2) sort both start and end points, go through the array, for start point i++, for end point i--.