Good question. It seems I lack speed implementing an optimal solution. During my initial FAANG interviews, I have had gone totally blank on my thought process and code. After few interviews, I don't actually dive in coding. I spend at least 10minutes about the problem and explain how it can be solved. I have realized that the interviewer is not looking an optimal solution at first. However, they're not satisfied with till the optimal code solution actually works.