How to solve problems Flashcards

1
Q

1st things 1st: your value to the company is your ability to solve problems

Understanding > memorizing

A

this is what the technical interview attempts to answer

but.. the thing is, above all you need to be able to show your thought process and knowing the tradeoffs between data structures and algorithms.

To do this, you need to:

  1. have a consistent process
  2. understand the tradeoffs between data structures and algorithms
  3. communicate clearly
  4. understanding of Big O
  5. problem solving process
  6. understanding of data structures and algorithms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Section Overview:

A

Solve a coding problem just like we would in an interview and analyze the different solutions.

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

What companies are looking for:

A

At the beginning and end of the day, the company doesn’t expect you to know everything, just a few things well (coding, technical foundations, communication). And to know how to break down problems and find answers

  1. Analytical (thought/problem solving process)
  2. Coding (readable, clean, and organized)
  3. Technical skills
  4. Communication skills

technical skills: why use a certain data structure over another, why use a certain algorithm over another

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

Technical Foundation: Data Structures

A
Lists/Arrays
Stacks
Queues
Linked Lists
Trees
Tries
Graphs
Hash Tables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Technical Foundation: Algorithms

A
Sorting
Dynamic Programming
BFS (searching)
DFS (searching)
Recursion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Step by step through a problem

A
  1. When the interviewer says the question, write down the key points at the top (sorted array, etc..) Make sure you have all the details. Show how you
  2. Double check: what are the inputs? what are the outputs?
  3. What is the most important value of the problem. Do you have time, space and memory, etc… what is the main goal?
  4. Don’t be annoying and ask too many questions.
  5. Start with the naive/brute force approach. First thing that comes into mind. It shows that you’re able to think well and critically.
  6. Tell them why this approach is not the best (i.e. O(n^2) or higher, not readable, etc…)
  7. Walk thru your approach, comment things and see where you may be able to break things. Any repetition, bottlenecks (like O(n^2), or unnecessary ..
  8. Before you start coding, walk thru your code and write down the steps you are going to do
  9. Modularize your code from the beginning. Break up your code into sensible small pieces and add just comments if you need to
  10. Start actually writing your code now. Keep in mind that the more you prepare and understand what you need to code, the better the whiteboard session will go
  11. Think about error checks and how you can break this code. Never make assumptions about the input. Assume users are trying to break your code
  12. Use descriptive and concise variable names that make your code readable
  13. Test your code: check for no params, 0, undefined, null, massive lists, async code, etc… Ask the interviewer if we can make assumptions about
  14. Finally talk to the interviewer where you would improve the code. Does it work? Are there different approaches? Is it readable? What would you
  15. If your interviewer is happy with the solution, the interview usually ends here. It is also common that the interviewer asks you extension questions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly