Max Priority Queue Implementation with Heap Data structure
Max Priority Queue is a data structure which manage a list of keys(values). And…
August 31, 2019
Here are some tips while preparing for your coding interviews.
Do not just study the optimal algorithm. Study the Brute force algorith too. This will give you better understanding of the optimal solution. And, what are the problems in brute force solution.
With so many references and solutions available on internet, you tend to see solution first. This is very bad practice, and will block your mind. You will not be able to come up to a solution if a different problem comes to you. If you are looking at solution first, you are memorizing the solution which will harm in the long run. Rather try to come up to a solution by yourself. Don’t worry about the complexity. Your mind will do wonders in this way. You are allowing your brain to find solutions.
While writing code, dont take help on an IDE. They will help in syntax errors and running the code. In practical interview, In almost 90% cases you are expected to write code on paper or on board. Today, IDEs are so advanced that they complete the word and any library function you want to use. Its the tendency of developer to take help of these IDEs and you dont remember the syntax. Although, syntax errors are not considered bad. But, its advisable not to use an IDE.
In big tech companies, these qeustions are often asked. And believe me, these questions are hard. If you didn’t do practice, you will not able to come up to a satisfactory answer. Some examples are:
Always try to solve question by ourselves. Although sometimes, you need to know the various ways to solve particular problems. But, you should not memorize the solutions. Expert interviewer will come to know about this, and you will be knocked out fast.
Interviewer likes people who knows about every bits and pieces of code. You should know about runtime and space complexities of your code. Big tech companies like to listen your thought process of solving the problem. A big silence is a negative point.
As normally candidates have few companies to target. You should not go straight to those companies to give interview. Either give mock interviews to your friends, or there are some online services which provides mock interviews. Another way is to start giving interviews to another companies for which you are not inrerested. But, by giving interviews to those companies will boost your confidence, and you will come to know many mistakes of yours. You will come to know what kind of questions are being asked by people. Reading from book and going in market are totally different aspect.
You should look at following:
Most of the time, candidates write the code and without testing their code, they hand over it to interviewer. There is no hurry. Please test your code with few test inputs. Sometimes, interviewer points out a mistake. And, candidate in hurry just fixes something carelessly. Which might fail other cases. So be very careful.
Once I saw a 5 page resume of a candidate. When asked about some things mentioned in resume. I came to know that these are the things that he studied while his school. Resumes are to mention about the practical things you know. Single page resume speaks out loud when written in a correct manner. Only mention things you know, and can be asked upon.
Don’t bother about mastering about many languages. Just stick to one language in which you can write code in front of interviewer.
Max Priority Queue is a data structure which manage a list of keys(values). And…
Sorting Problems Merge Sort Quick Sort Heap Sort Bubble Sort Selection Sort…
Problem Statement Given an array of integers, find if the array contains any…
Problem Statement Given an array nums of n integers and an integer target, find…
First try to understand question. Its a binary tree, not a binary search tree…
In this post, we will see some of the frequently used concepts/vocabulary in…
System design interview is pretty common these days, specially if you are having…
Introduction You are given an array of integers with size N, and a number K…
Graph Topological Sorting This is a well known problem in graph world…
Problem Statement Given a Binary tree, print out nodes in level order traversal…
Problem Statement Given an array nums of n integers and an integer target, are…