I'm going to interview with Amazon this week. This is my first technical interview ever, so I wonder say the problem is the Unique Letter String problem, should I tell the interviewer that, "Hmm this looks like a problem that we could use a sliding window"? Will this trigger a red flag and they will think I've seen this problem before, now I'm just trying to remember the code that I memorized? #interview #amazon
No need to say that you have seen the question before. It is ok to pretend to struggle or think a little bit before you come up with the solution. If I am interviewing someone and I suspect that the person has seen the question before, then my expectations will have gone up much higher.
Experienced interviewers will be able to poke and prod to see if you just memorized the solution, or if you clearly understand why and how you are supposed to use a specific algorithm or data structure. In your example, I would not lead with what you posted. Instead, unwrap the problem first, describe your thought process (what are we trying to solve exactly? what do subproblems of this question look like?, etc.), and eventually end up with the algorithm to use.
Ability to identify pattern is a skill. One might say that it's a critical skill for a software developer. No need to hide that, but I agree with what @Microsoft said above - don't just blurt out "sliding window" the moment you see the problem.
Yeah, don’t do that. Especially if it turns out not to be sliding window. Take your time to think first.
Yeah don’t say it. I would say take a minute to internalize the question and think about if your solution would really work. Then 1. Solve examples n edge cases 2. Theow out brute force n time complexity 3. Then give your main solution but not saying things like sliding window. Infact you can see describe the window. Idk go with your gut as well