Remove Duplicates from Sorted Array - Leet Code Solution
Problem Statement Given a sorted array nums, remove the duplicates in-place such…
March 31, 2020
Its every software engineer’s dream to work with the big FAANG companies (Facebook, Amazon, Apple, Netflix, Google). Their interviews are considered to be very hard. Lets look at what these companies expect from the candidates in terms of interview performance.
Below are some points on which these companies evaluates the candidate
How you assess the problem and arrive at a solution by identifying the right data structure/ algorithm.
Its about how you understand the problem, and how you arrive to a solution. Its essential to solve the problem upfront. But, there can be many approaches to solve the problem. Candidates are expected to explain their solutions, and the choice of choosing the right data structures is very important.
As I explained in Never try to jump to the optimal solution first, you should never jump to the best solution first. And, do not jump to coding. You need to explain your thoughts or solutions to the interviewer. And, there will be a discussion to understand your approach, and you should be aware of the complexities of your approach. It is closely observed that how you are able to find issues in the approach, and how you are able to come up with solution to that.
Some points are:
While writing code, you need to use best practices available for coding. Like, structuring the code, how you modularize it, generic functions, naming conventions etc.
Remember, you can write any code with one large piece of code in single function. You need to write it in such a way that it is maintainable, easier to refactor and easy to read.
Some important points are:
How fast are you in assessing the question, identifying the right approach and coding the solution.
You are expected to solve one or two problems and with complete code. And, they generally has fixed time interview. Example: Google has 45 minutes for each interview, and it can not exceed this time.
For this, you need more and more practice. Keep an eye on time, while solving problems. Although, this looks looks trivial. But, this is very important factor in deciding the selection for candidate.
Some points are:
Your ability to communicate your thought process and ask the right clarifying questions.
You are not expecpected to keep silent, and start writing your code in one go. You are expected to speak from moment you hear the question. The interviewer wants to hear your thoughts. If you are thinking about the problem, and don’t want to speak. Convey this to the interviewer that give me few minutes.
At every point or stages, you are expected to explain your thought process. And, your ability to ask write questions is very important here.
Some points are:
You are not expected to write test cases. But, you are expected to test your code for all good and edge cases. Before hand over your code to interviewer, you can explain that this is my code. But, let me run some test cases.
By running test cases, it means you are trying your code with different inputs. It gives very good impression that you are concerned about the bugs in your code.
Some points are:
Problem Statement Given a sorted array nums, remove the duplicates in-place such…
Problem Statement Given a string s, find the longest palindromic substring in s…
Young Tableau A a X b matrix is Young Tableau if all rows(from left to right…
This topic is one of the most common studied. When somebody started preparation…
Introduction You are given an array of integers with size N, and a number K…
This is kind of preliminary technique of sorting. And, this is the first…
Introduction So you have a Django project, and want to run it using docker image…
Introduction It is very important to introduce few process so that your code and…
Introduction In this post, we will see a sample Jenkin Pipeline Groovy script…
Introduction We often require to execute in timed manner, i.e. to specify a max…
Introduction In some of the cases, we need to specify namespace name along with…
Introduction In most of cases, you are not pulling images from docker hub public…