[0:00]One mistake that most of us do in a DSA algo interview. In a typical DSA algo interview you're given a problem statement and you're always given an input. In that you have to do something and you have to generate a possible output and you always have to do it in the most optimal time complexity and in the most optimal space complexity. In order to trim down the space complexity, what most of us do is we end up changing the input in order to solve that given problem. Now this is something you should definitely avoid. Why do I say that? Let me give you an example. In a real life scenario, imagine I give you a bunch of user data. Now, I ask you to do something on it in order to give me something. Will you alter that user data? You won't right, because if you end up altering the user data, you will end up losing the data, right? So this is why it is not considered as a good practice. If the question demands you to alter the user data, then only go ahead and do it, otherwise do not do it without the interviewer's permission. Now this is a tip that I will like to give you because a lot of people do change that input in order to save a slight amount of space and that is definitely not a good practice in a DSA algo interview.
Watch on YouTube
Share
MORE TRANSCRIPTS



