Have you ever looked at the source code that people write in the comments on platforms like LeetCode? You will soon realize that only knowing how to write code that passes all test cases is not enough to get your dream job!
Here’s a list of things the interviewer is assessing you on:

  1. Can solve a problem at first sight and not just recite an algorithm by heart?
  2. Are you able to communicate well with the interviewer?
  3. Do you explain your ideas in a simple and clear way?
  4. Are you able to collaborate with your interviewer, by taking the lead, to solve the task at hand?
  5. Do you discuss pros and cons of different approaches such as time complexity and memory consumption?
  6. Can you design the major components of the algorithm instead of improvising while you write the code?
  7. Do you write clean and easy to understand code?
  8. Is your code extensible?
  9. Are you able to run your code on a simple test case?
  10. Can you find edge test cases?
Also, the most important thing the interviewer wants to figure out is:
Would I hang out for a beer with you after work? Do I see a potential colleague I can work well with?