Saturday, July 7, 2018

Mock Google interview (for software engineer job) - coding & algorithms tips

July 7, 2018

Introduction


It is 20 minutes video talk and I like to write down some notes. And I also like to study other videos provided by the engineer - Patrick Shyu.

Taking notes from the talk


3:00  Good consideration pros and cons of time and space. Remember show the impact.
Validate a lot of work, craft the story, as soon as some one asks you. Check the interviewer's reaction.

Do not make it too long. Keep it quick. Just 45 minutes. First 15 minutes talking about experience. Next 30 minutes about white board about the algorithm.

5:27
Ask an algorithm on the white board:
Given a grid, find maximum grid. It is commonly asked called flood fill.

How you solve?

Data structure, algorithm and ...

7:12
Tree view, you will be evaluated to have ability to rise a senior engineer level.
You do not have foundation to be a senior level. Tree traversal, and complexity ...

8:20 PM depth first search, double first search (can be BFS), it can be iteratively solved.

Leave it open ended. Grid data structure, 2-D integer.

To a junior, give a start pointer.

10:12  How interesting people can get those neighbors. You have to have a lot of bound check. GetNeighbors, and ..., save your much more time.

Delegate the way to do checking. Hashmap or hashset, what is your hashset. Sometimes you can have a red flag.

12:00 recursive function - 10,000 iteration - how big the grid will be? Push cells to stack or queue.

13:55 Write small font. Bring my own pen.

Tradeoffs, space and time tradeoff


14:42 It should be done before you write the code.

 You need to be able to understand time and space tradeoffs.

Talk about iterative solution vs recursive. At front it is best. We are just coding, we do not know what it is end? Time complexity.

Each cell just once.
16:02 - It is not really you got the answer. Whether you are confident on the answer, how you can do it.

17:25 Experienced interviewer.

Worst time to give the answer of the question.

17:59 Tradeoff between space and time complexity. Evaluation of your code, did you know tradeoff? Did you consider creating data structure? How is your efficiency? How is your jerk? Enthusastic? Take feedback. Overall value skills.

18:03 Your coding good, object-oriented programming. Did you consider using your own data structure?

No comments:

Post a Comment