Wednesday, September 20, 2023

# How To Study For Coding Interviews

## Weeks 4 & 5 Practice Simple Data Structure And Algorithmic Challenges

How to pass a coding interview |Interview tips for software developer |Cracking the coding interview

As you are familiarizing yourself with data structures, start practicing relatively simple coding problems associated with these data structures and algorithms.

These questions are typically not asked in interviews at big tech companies. Even if they are, theyre usually used as fizz-buzz type warm-up problems. Such questions are also common during phone interviews. However, practicing these coding interview questions will help you internalize the data structures and help you tackle the harder questions which youll be practicing a few weeks from now.

Brush up your array skills with questions like:

• Remove Even Integers from Array
• Merge Two Sorted Arrays
• First Non-Repeating Integer in an Array
• Find Second Maximum Value in an Array

• Find Length of Linked List
• Search in Singly Linked List
• Find Middle Value of Linked List

Brush up your Stack/Queue skills with questions like:

• Sort values in Stack
• Create Stack where min returns minimum value in O
• Implement Two Stacks using one Array

Practice Tree Problems like:

• Find minimum value in Binary Search Tree
• Find Height of Binary Tree
• Find kth maximum value in Binary Search Tree

Practice Graph Problems:

• Total number of words in Trie
• Find all words stored in Trie

Practice basic Heap problems:

• Find k smallest elements in a list
• Find k largest elements in an array

## Practice For Cracking Any Coding Interview

Coding questions in this article are difficulty wise ordered. The idea of this post is to target two types of people.

• Competitive Programming Preparation : It is recommended to finish all questions from all categories except possibly Linked List, Tree and BST. However at least 10 questions from these categories should also be covered. If you have never done competitive programming before, it is strongly recommended to see How to Begin with Competitive Programming first. If you wish to get yourself prepared with a language first, you may first begin C++ Track or Java Track
• Interview preparation It is recommended to cover all topics. In every topic, you can start from questions according to your comfort level.
• The practice system tells you exactly the test case where your code failed. In case you need more clarity about a question, you may use the expected output button to see output for your given input. You can also view successful submissions of others in case you are stuck. To see solutions of others, please click the All Submissions button at the bottom of the problem statement.

## Once You’ve Got The Job

Congratulations!

Keep learning.

You’re never really done.

`**********************************************************************************************************************************************************************************************************Everything below this point is optional. It is NOT needed for an entry-level interview.However, by studying these, you'll get greater exposure to more CS concepts, and will be better prepared forany software engineering job. You'll be a much more well-rounded software engineer.**********************************************************************************************************************************************************************************************************`

Don’t Miss: React Js Developer Interview Questions

## Practice The Areas That You Are Good At

Preparation for coding interviews usually involves studying and practicing multiple concepts. But if your interview is not far away, reviewing all the concepts youâve prepared isnât ideal. Instead, focus on revising and practicing the areas youâre already good at. This will help you feel less anxious and far more confident.

To know exactly what to practice for coding interviews, check out our post on âWhat to Practice for Coding Interviews

## Dealing With Distractions Along The Way

Distractions, in whatever form, can disrupt momentum and throw you off guard. While preparing for tech interviews, as much as it is important to practice everyday, it is essential to keep distractions at bay.

Bring-in discipline in your everyday life and have a balanced routine if you want to avoid burnouts and keep interview anxiety in check.

If you think interview anxiety is a lurking threat, find out the best way to deal with Interview Anxiety in this comprehensive guide.

Also Check: How To Use The Star Interview Response Technique

## A Note About Video Resources

Some videos are available only by enrolling in a Coursera or EdX class. These are called MOOCs.Sometimes the classes are not in session so you have to wait a couple of months, so you have no access.

It would be great to replace the online course resources with free and always-available public sources,such as YouTube videos , so that you people can study these anytime,not just when a specific online course is in session.

## Design Patterns: : Elements Of Reusable Object

Regardless if youre learning design patterns for the object-oriented programming interview, you will need to know design patterns as a software engineer at these large companies.

The book is the origin of the worlds most common design patterns today and showing proficiency in these for your object oriented interview is a requirement for certain large technology companies like Amazon.

Recommended Reading: How To Prepare For A Cultural Fit Interview

## Interviews Are Not Interrogations

If you have ever been to a rapid-fire question interview, you can relate. Interviewers work with a set list of questions, expect short answers, and keep the interviewee on edge. It is always good to put the candidate at ease. Let them briefly talk about themselves. Ask follow-up questions instead of turning the interview into a Q& A.

However, this doesnt mean that you, as the interviewer, dont prepare a list of questions. Programming interview questions ensure that all interviewers evaluate all candidates equally. The trick is knowing how to use the questions as conversation starters.

Look for passion. Smart people are passionate about the projects they work on. They get very excited about the subject. They talk quickly and get animated. Being passionately negative can be just as good a sign. Joel Spolsky, Board Chairman for Stack Overflow, Glitch, and HASH

You May Like: How To Present Yourself In An Interview

## Best For Mock Interviews: Pramp

Coding Interview Questions And Answers | Programming Interview Questions And Answers | Simplilearn

Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã

Once you feel confident in your mastery of algorithm design principles and have done enough coding problems, you will be ready to do a few mock interviews. Pramp is a great resource that automatically matches you with other engineers based on your availability, practice needs, and programming language preferences.

You will then have a live 1-on-1 video session that will take place on the website. You will go over programming questions, practice soft skills, and behavioral questions.

Although efficiently writing code is important, being able to build that rapport during the whiteboard interview is going to be what will make or break your interview.

It is important for the interviewer to feel like you will be able to get along. This is their future fellow coworker that they are looking for. This is one of the key elements of programming interviews and should not be overlooked. If you want to do an excellent job in the interview, mastering soft skills are really important.

Check out my big tech interview framework to read more about the discussion you should be having with your interviewer.

Recommended Reading: What To Expect During An Exit Interview

## Factors To Consider Before Deciding How Long To Spend On Studying For Coding Interviews:

#### Your knowledge of data structures and algorithms

Extensively covering concepts in core data structures and algorithms is decisive in influencing interview success. Before you start off, take a day or two to sift through topics you have to cover.

Below is the list of topics that feature in technical interviews:

• Basics of programming and computer science

Sample questionsVideo lecturesIdeal solutions

## Use Books And Courses

With the links weve provided in this article, youve already got the bulk of the preparation resources you need. But sometimes youre probably going to want to go deeper and really study something inside out. Thats where books and courses can come into their own.

Heres a brief list of some of our favorite books and courses:

For coding, theres obviously Cracking the Coding Interview by Gayle Laakman McDowell, the overwhelmingly popular choice and still as relevant as ever.

We also recommend this video of Gayle going through a problem at Facebook, which is definitely worth a view as you hone your answer method.

If you feel like you need to do a course, Educative does great courses on coding and system design. Weve also had candidates tell us good things about AlgoExpert.

For the system design part of your interview, we recommend starting with our guide to system design interview prep. When you want to go deeper, System Design Interview: An Insiders Guide by Alex Xu, has been recommended to us by a lot of candidates.

You May Like: How Do You Conduct An Interview

## What To Do When You Get The Question

Many candidates start coding as soon as they hear the question. That is usually a big mistake. First, take a moment and repeat the question back to the interviewer to make sure that you understand the question. If you misunderstand the question, then the interviewer can clarify.

Always seek clarification about the question upon hearing it, even if you think it is clear. You might discover that you have missed something. It also lets the interviewer know that you are attentive to details.

• How big is the size of the input?
• How big is the range of values?
• What kind of values are there? Are there negative numbers? Floating points? Will there be empty inputs?
• Are there duplicates within the input?
• What are some extreme cases of the input?
• How is the input stored? If you are given a dictionary of words, is it a list of strings or a trie?

After you have sufficiently clarified the scope and intention of the problem, explain your high-level approach to the interviewer, even if it is a naive solution. If you are stuck, consider various approaches and explain out loud why it may or may not work. Sometimes your interviewer might drop hints and lead you toward the right path.

Only start coding after you and your interviewer have agreed on an approach and you have been given the green light.

## The Interview Process At Faang+ And Tier

If youâre a software engineer who wants to crack challenging technical interviews, it is essential that you know the interview process at top companies and accordingly plan your prep.

For junior software engineering and IC positions, coding is a significant part of tech interviews. Coding problems, typically around algorithms and core data structures, feature in multiple interview stages.

After the Initial Screen with the recruiter, youâre invited to the Technical Screen, which is typically a coding interview. Youâre asked to solve 1-2 coding problems in this interview. Hiring managers in this round carefully assess how you factor in Big-O complexities, your approach to problem-solving, and your ability to write error-free code.

The Technical Screen is a time-bound interview, usually lasting about 30-45 minutes. While some companies prefer conducting this interview remotely, others may ask you to appear at the company premises for the technical screen.

Coding questions also feature during On-site or In-person interviews. Depending on the position youâre applying to, On-site interviews typically have 1-2 coding rounds. These rounds are time-bound and seek to evaluate your general approach to coding and problem-solving.

You May Like: How To Record An Interview On Iphone

## How To Start Your Interview Prep

I think that for most people starting out in this interview prep process, LeetCode is pretty hard. Here are two possible starting problems, though the best point of entry is admittedly Cracking the Coding Interview.

• Fizz Buzz on Leet Code. I recommend it because it should not require any additional interview preparation, and will help you familiarize yourself with the Leet Code platform.
• Jewels and Stones on Leet Code. If you are not able to solve this on your first try, then you will have to learn a technique that is useful in many coding interview problems.

## Best Coding Interview Resources

Studying for programming interviews can quickly turn into a full-time job. When I was studying for my interview at Google, I would wake up 3 hours before work every day just to squeeze in practice interview questions.

Having the correct tools to set you up for success is imperative to passing your programming job interviews. I have failed a few programming interviews in my day, and I’ve learned what works and what doesn’t. So I put together a guide of the best coding interview books and resources. I categorized them as well so people can tailor the resources to their studying needs.

Read Also: What To Write In A Post Interview Email

## What’s The Best Way To Prepare For A Coding Interview

Data structures and algorithms will likely be an integral component of the coding challenges, so it’s important to spend time on those topics when preparing for your interview. Try to mimic the actual interview conditions in your prep: Practice on a whiteboard and set a timer to emulate the time pressure during coding challenges. As you write your code, practice explaining your thought processes out loud.

It’s also key to do your research on the company â this will give you a better idea of what languages, frameworks, and other tech it uses. You can also research the company’s current strategies and goals to best identify and articulate how you will contribute to the company.

As the interview processes for many well-known companies are widely discussed, this research could lead you to specific information about your upcoming coding interview. At Google, for instance, applicants must pass a pre-screen and an onsite interview, which includes meeting with 4-6 Google employees for nearly an hour each.

Remember that while much of the interview will focus on technical skills, there will also be behavioral and soft skill components involved. It’s a good idea to connect to the company’s recruiter to get the full picture of the process.

Lastly, run through a couple of mock interviews. Have a friend play the role of the interviewer or use free mock interview sites like Pramp to practice.

## Preparing For The Systems Design And Coding Interview

Coding Interviews Be Like

At Big Tech and high-growth startups, coding and systems design interviews are common – and fairly standard. A lot of people have asked me for preparation advice for these. Here is what I used when getting ready for an E5/E6 Facebook interview, and the one at Uber – where I was hired as a senior software engineer . It’s the same resources I recommend to people who are preparing for Big Tech or high-growth tech company interviews.

Also Check: How To Prepare For A Zoom Interview

## Practical Tips For Coding Questions

This section dives deep into practical tips for specific topics of algorithms and data structures, which appear frequently in coding questions. Many algorithm questions involve techniques that can be applied to questions of a similar nature.

The more techniques you have in your arsenal, the greater your chances of passing the interview. For each topic, there is also a list of recommended questions, which is valuable for mastering the core concepts. Some of the questions are only available with a paid subscription to LeetCode, which in my opinion is absolutely worth the money if it lands you a job.

## The Day/night Before The Interview

Rule #1: get a good nights sleep!! Nothing is more important than being at your best for what promises to be a very exhaustive day of programming acrobatics. Youve done your homework and youre ready have confidence in yourself and the hard work and prep time youve put in to get here!

Do not violate this rule unless a work/family emergency dictates otherwise. And if this rule is broken for subsequently-mentioned reasons, it is probably wise to postpone the interview. This happens more frequently than you think, and folks will understand.

Read Also: What To Say After An Interview Email

## Plan Out The Full Solution Before You Code

There are some super fancy whiteboards out there. But chances are, the whiteboard that youre going to use is not going to have a copy-paste option. That means that you want to have a good outline of your code before you write it.

Often times, people dive right into writing code as soon as they get asked a problem in their interview. Now its totally fine if you want to go ahead and define your method upfront, but that should be the extent of the code you write until youve fully worked out the solution. Writing any more code than that is a critical mistake for two reasons.

First, as I said, whiteboards dont have copy-paste functionality. That means that if you want to move lines of code around, you have to either erase and rewrite them or draw arrows going all over the place. You dont really want your whiteboard to look like this:

Keeping the whiteboard organized is easier for both you and your interviewer. It is easier for them to understand your solution and its much easier for you to keep track of what is going on. And if you decide to just rewrite stuff instead, youll be wasting a ton of valuable time.

The other issue with starting to code right off the bat is that it can lock you into a specific way of thinking about the problem. Well talk about this more in point 7, but this can be incredibly harmful to your interview performance.

The above resource is dense and written in language thats hard to understand. While the original source material in design patterns is great, it doesnt help much if its difficult to understand.

Consider Head First Design patterns to study a simplified explanation of those common design patterns. It might not be as in-depth as the original source material, but your understanding in design patterns will be more than enough to crack any object-oriented interview.

Also Check: The Passion Of The Christ Mel Gibson Interview