- Extract keywords (Input constrains, Data types, Scale of input)
- Classify the Problem
- What are the algorithms commonly used on this kind of problems?
- Paraphrase the question
- Understand test cases / Ask for more test cases
- Function Signature
- Clarifications / Edge Cases
- Trade Off Analysis
-
Brute Force Solution
-
Outline your approach
-
Space & Time Complexity *& ***(call stack) - specify variables
(In what situations is the solution good? In what situations is the solution bad?)
-
Analyze Inefficiency
Bottlenecks, Unnecessary Word, Duplication Work
-
-
Optimal Solution
- Outline your approach
- Space & Time Complexity *& ***(call stack) - specify variables
- Compare it with Brute Force
- Ask interviewer: "Does this sound like a good approach?"
-
- Implementation, keep comparing optimal solution and brute force solution, explain why this solution is better to show your understanding
- Verification
- Scan through
- Run test cases - small/medium sized, one more likely to detect errors
-
Notifications
You must be signed in to change notification settings - Fork 0
ak-py/leetcode
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
practice with popular leetcode problems
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published