Skip to content

Instantly share code, notes, and snippets.

@iorlas
Last active December 19, 2023 17:49
Show Gist options
  • Save iorlas/263ebd8df92d06f04e20fd69bdd496cc to your computer and use it in GitHub Desktop.
Save iorlas/263ebd8df92d06f04e20fd69bdd496cc to your computer and use it in GitHub Desktop.
Interview Preparation Recommendations

General

Miscommunication and eagerness to write the code - are two pinnacles of failure for knowledgeable and experienced engineer. We will fight it. Here is the process, which we propose to eliminate the risks as much as possible.

P1. Rephrase the problem in your own words

- Write comments

P2. Propose at least 2 examples input and expected output

- WRITE IT DOWN

P3. Think about edge cases

- WRITE IT DOWN
- Ask should you care about ordering and null values, or any other special cases - ask to simplify it

P4. Figure out the data structure used / to be used

- Might help you right away
- Does it reassemble any data structure?
- Does it look like an LL/Hashmap/Tree/Graph/Queue/Deque?

P5. Think about the solutions

- Propose one option briefly
- If no signals will be apparent from an expert - proceed
- Check for any signals
- Select the easiest one
- Option: write down the process
    - Example 1
        - s = "aBcde", curr = "a"
        - curr = "a" ? lower case => "a"
        - curr = "B" ? not lower case => "b"
- Option: Estimate the complexity - compute and memory

P6. Pseudopod prototype

- Will you need a depth-first search? Sliding window? Divide and conquer? Something else?
- Stuck? Review the requirements, re-read it once again
- Need to decrease the complexity? Think about additional memory usage - hashmap, stacks
- Option: Estimate the complexity - compute and memory
- Validate with an expert

P7. Write the code

- Since the approach, algorithm, and data are approved, it should take the least amount of time
- Can't recall a function? Ask, or create a placeholder!
- Bugs? Use prints to debug it!
- Too many prints? Always add an incremental ID to it - quick and easy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment