Interview Problem Solving Strategy! Flashcards

1
Q

What are the steps to solve a problem?

A
  1. Repeat the question in your own words
  2. Check assumptions
  3. Use real examples
  4. Brainstorm solutions and their time/space complexity
  5. Write working code (no pseudo-code please!)
  6. Test your code, always
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you generate an Idea?

A

Simplify the task
Try a few examples
Think of suitable data structures
Think about related problems that you know(Your Pattern Notebook)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly