Code 401: Class 0 - Prework Notes
- Solving code problems in an interview
- Spend time up front planning how to approach the problem
- Build a simple solution first then add complexity
- Suggested steps
- Read the problem twice
- Solve manually with 3 sets of sample data
- Optimize the manual steps
- Write the manual steps as comets or pseudo-code
- Replace the comments or pseudo-code with real code
- Optimize the real code
- Know how to do the following in any language that you may be tested on
- Create a list
- Sort a list or array
- Create a map or dictionary
- Loop through a list or dictionary
- Parse strings
- Convert from string to int, int to string
- If a code challenge has many complex parts “divide and conquer”
- The premise of this article is that by valuing one’s time at $1,000 per hour one will focus on doing things that are actually important. The author suggests that many “busy” people are busy by choice and to their detriment. A number of successful professionals are quoted as saying something to the effect of refusing 90+% of opportunities that are presented to them. The major take-away is to learn to say “No” more often.
- This article presents a systematic approach to problem solving
- Understand determining exactly what the problem is
- Plan don’t start writing code without first thinking through the steps in the solution, possibly comment the solution first
- Divide & Conquer
- When stuck, go line by line and figure out exactly what you told the computer to do not what you wanted it to do
- Practice in all forms
- 5 Whys developed by Sakichi Toyoda (founder of Toyota)
- Best suited to simple or moderately complex problems
- Steps
- Gather a team that is familiar with the problem
- Define the problem
- Ask the first “Why”
- Ask four successive “why’s” each relating to the answer to the previous question
- Stop asking “why” when there are no additional useful responses
- Address the root cause
- Monitor the solutions to confirm they are working
Return to reading-notes Deployed Site
Return to reading-notes Mark Down