Skip to content

Latest commit

 

History

History
111 lines (71 loc) · 3.29 KB

File metadata and controls

111 lines (71 loc) · 3.29 KB

Session 4 | Homework

In this homework, you will watch a real mock Google engineering interview, pause before the solution, try the problem yourself, and then compare your approach with the engineers' discussion.

1. Goal

You will:

  • observe how engineers communicate during a coding interview
  • pause and solve the interview question yourself before watching the solution
  • write down your thought process clearly
  • provide Python code for your solution
  • compare your approach with the video discussion

Take your time and think. The goal is not to rush to the answer. The goal is to practice how you reason, explain trade-offs, and improve your solution after feedback.

2. Video

Watch:

How to: Work at Google — Example Coding/Engineering Interview

Google engineers demonstrate a mock interview question. After they code, they highlight best practices for interviewing at Google.

Although the solution in the video is written in C++, the thought process is the same. You should try to implement your own solution in Python.

This homework is high difficulty. Do not worry if it takes time. Pause the video, think carefully, try examples by hand, and build your solution step by step.

3. What to do

  1. Start watching the video.
  2. When the interviewer gives the coding problem and before the engineers complete the solution, pause the video.
  3. Try to solve the problem yourself in Python.
  4. Take notes while you work:
    • What did you understand the problem to be?
    • What examples or edge cases did you test mentally?
    • What was your first idea?
    • Did you improve or change your approach?
    • What is the time and space complexity of your solution?
  5. Resume the video and watch how the engineers solve it.
  6. Compare your solution with theirs.
  7. Write a short reflection on what you would do differently in an interview next time.

4. File to submit

Create this file:

session4/solutions/exercise-04-homework.md

Your markdown file should include:

# Session 4 Homework

## Video

Link: https://www.youtube.com/watch?v=XKu_SEDAykw

## My understanding of the problem

Write the problem in your own words.

## My thought process

Explain how you approached the problem.

## My Python solution

```python
# Paste your Python code here
```

## Complexity

- Time complexity:
- Space complexity:

## Comparison with the video solution

What was similar?
What was different?
What did you learn?

## Interview reflection

What would you do better next time when explaining your thinking?

5. Rules

  • Use Python.
  • Do not copy the solution before trying it yourself.
  • Pause first, solve first, then continue watching.
  • It is okay if your first solution is not perfect.
  • Write enough explanation that another student can follow your thinking.

6. Share your work

Post your completed session4/solutions/exercise-04-homework.md in the class discussion forum.

Use the MS Teams discussion forum:

MS Teams discussion forum

When you post, include:

  • your markdown solution
  • your Python code
  • one thing you learned about interviewing