# Python Interview with an Amazon engineer

#### Watch someone solve the unique shapes in a matrix problem in an interview with an Amazon engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.

---

### Interview Summary

**Problem type**  
Unique Shapes in a Matrix  
**Interview question**  
Find the number of unique shapes inside a grid of matrix. A shape is denoted by a grouping of 1s from above, under, left, and right.  
**Example:**

```
0 0 0 1
1 1 0 1
0 1 0 0
1 0 0 1
1 0 0 1
```

Total number of unique shapes - 2

### Interview Feedback

**Feedback about Cashmere Flamingo (the interviewee)**

**Advance this person to the next round?**  
Yes

**Technical skills:**  
3/4  
**Problem solving ability:**  
2/4  
**Communication ability:**  
4/4

> **Strengths**  
> - Candidate asked a lot of clarifying questions  
> - Candidate explained the solution and approach really well  
> - Was able to code out the solution without a lot of hints  
> - Was able to provide the right space and time complexities  
>  
> **Areas of improvements**  
> - Needed a lot of hints to arrive at the solution  
> - Code written had a lot of bugs, few of which were self corrected but few of which had to be pointed out  
> - Spent too much time explaining the algorithm which left less time for coding  
>  
> **Advice for future interviews**  
> - Practice more leetcode questions in time bound manner  
> - Clarify as many of the edge cases and outlying scenarios as you can in the beginning  
> - Dry run the code yourself before saying done

---

### Interview Transcript

**Digital Avenger:** Okay, so before we get started, I feel that. Can you answer a few questions? That sort of helps me model the interview in a better format for anything that you might have in mind.  
**Cashmere Flamingo:** Yeah. Okay. Basically I have a virtual final interview for an intern position.  
**Digital Avenger:** Okay.  
**Cashmere Flamingo:** Yeah. So I would basically like to use this opportunity to prepare for my actual interview.  
**Digital Avenger:** Excellent. Okay, that is mostly what I was going to ask. Okay, so it's for an internship position and you have that coming up. I'm assuming since the interview is targeted, the position is at Amazon.  
**Cashmere Flamingo:** Yeah, position is at Amazon.  
**Digital Avenger:** So you're in. Forgive me for asking, is this a bachelor's or a master's student?  
**Cashmere Flamingo:** I'm a bachelor's student, so I'm a junior.  
**Digital Avenger:** Okay. Third year, fourth year.  
**Cashmere Flamingo:** Third year.  
**Digital Avenger:** Okay. Excellent. The optimal time to do this. Okay, cool. I'll conduct the interview like that. You might get some behavioral questions. I haven't taken an internal interview in quite a while. I don't think you will. Not combined at least.

---

### Additional Feedback

**Feedback about Digital Avenger (the interviewer)**  
**Would you want to work with this person?**  
Yes  
**How excited would you be to work with them?**  
4/4  
**How good were the questions?**  
4/4  
**How helpful was your interviewer in guiding you to the solution(s)?**  
4/4

---

## Conclusion
This document summarizes the interview process for the problem "Unique Shapes in a Matrix" and provides feedback regarding both the interviewee's performance and the interviewer's effectiveness.
