- String Reversal
- Palindrome
- Integer Reversal
- Max Chars
- FizzBuzz
- Array Chunk
- Anagrams
- Sentence Capitalization
- Printing Steps
- Pyramid - Two Sided Steps
- Find the Vowels
- Generate Matrix Spiral
- Fibonacci Series
- Queue
- Weave Queues
- Stack
- Queue From Stack
- Linked List
- Midpoint of a Linked List
- Detecting Linked List Loops
- Linked List - Return Nth Element From Last
- Tree - Breadth First Traversal, Depth First Traversal
- Tree Width and Level Width
- Binary Search Tree
- Validate a Binary Search Tree
- Bubble Sort, Selection Sort, Merge Sort
- Understand the problem in your own words and analyze it. Never assume that you've done it before. Does the problem have any constraints w.r.t time and space complexity, inputs, things to avoid, etc. Are you allowed to modify the input?
- Input and Output types, how many inputs and outputs
- Come up with examples and edge cases.
- Break down the problem into subproblems and solve them independently, think of strategies that might work and think about why the strategies might not work. Think about patterns, data structures and algorithms that you can use. Try out your strategy for specific cases (debug on examples), then generalize.
- Write Pseudocode and think about considerations while converting pseudocode to real code.
- Code your solution, then simplify and optimize code by checking for time and space complexity, code repetition, readability, code length, comments. BUD optimization - Bottlenecks, Unnecessary code, Duplicate code.
Consolidated from the following references: