Unlock skill-first hiring with HackerEarth today

Learn more
piller_image

How to use mock interviews to streamline your technical interview prep

This blog is a guest contribution from Algodaily.com


The way most people study/prepare for technical interviews with coding problems isn’t conducive. An average person will go on a site like HackerEarth or AlgoDaily and will only spend a few minutes actually trying to solve a problem.

Often, they’ll then jump to the solution after getting stuck. Then they’ll read the solution, try to memorize it, and call it a day.

A better way to prepare

Here’s a more effective way, and it’s why the AlgoDaily system was designed the way it was:

  • First, choose a cadence

    One interview problem a day seems to be the ideal amount. If you do 2 or 3 a day in the manner described, you’ll be spending 3-4 hours doing it, which is quite ambitious unless you are preparing full time.

    It’s also mentally tiring, and you are unlikely to derive a whole lot of marginal benefits from the 3rd or 4th problem. At a certain point, you’ll probably begin to eagerly jump toward obvious solutions, which will not help you understand where your strengths and weaknesses lie.

    The below suggestions nudge your thought process toward retaining the patterns and eventually help you solve problems you’ve never solved prior.

  • Commit some time and try to solve the problem by yourself 

    Before jumping to the solution, dedicate about 20-30 minutes to a problem and try to solve it all by yourself. Try to get some semblance of a correct output.

    Brute force it if you have to—try to reason about any working solution, no matter how slow it is. It will help you understand the necessities to optimize it later.

  • Don’t fret if you get stuck

    If you’re stuck at a problem, restart by looking for hints and then keep trying to solve it. Repeat until there are no more hints.

    When you run out of hints, start going through the problem statement or solution very slowly. As soon as you are unstuck, STOP READING. Use the bit of insight to start coding again.

  • Anytime you get stuck again, repeat from the beginning

    Even though you’ve read a part of the solution, the vast majority of learning comes from the struggle of thinking it through yourself. That is what will help you retain it for the next time.

    Here are some additional steps that really made the difference in my prep:

    • Write the solution again in another programming language. This will let you think through the abstractions again and help with retention
    • Save the problem and revisit it in increasingly long spurts. This is called spaced repetition, a technique employed in the AlgoDaily technical interview course. For example, you may want to try to solve a problem today, again in 2 days, then revisit in a week, then a month.

    Some questions to ask at each step:

    • What have I learned so far? Is there anything I should know for solving the problem the next time?
    • What pattern or technique was the solution derived from?
    • What hint did I need? How far was I from solving it myself?
    • If asked the same question tomorrow, can I readily solve it without any assistance?

Before we jump into the importance of mock interviews, here are some things you must cover.

Without a solid understanding of the following concepts, you may struggle during mock interviews: 

  1. Hash Tables: This is arguably the most critical data structure. Make sure you can implement one from scratch.
  2. Stacks/Queues: It is important that you know these data structures such as FILO and FIFO
  3. Linked Lists: Know about singly linked lists, doubly linked lists, and circular.
  4. Trees: Get to know basic tree/node construction, traversal, and manipulation algorithms. Learn about the subsets—binary trees, n-ary trees, and trie-trees. Lower-level or senior programmers should know about balanced binary trees and their implementation.
  5. Graphs: Learn about implementations (objects and pointers, matrix, and adjacency list) and their pros and cons.
  6. Algorithms: 
    1. Sorting: Get to know the details of at least two n*log(n) sorting algorithm. I recommend Quicksort and Mergesort
    2. Binary Search: Binary search is the most popular search algorithm. It is efficient and also one of the most commonly used techniques that is used to solve problems
    3. Tree/Graph traversal algorithms: Breadth-first Search and Depth-first Search are musts. Also know inorder, postorder, preorder.
    4. Basic discrete math (logic, set theory, etc.)

For this knowledge, the best way to study might be the flash-card style. There are tons of flash-card applications online, and there are many guides and quizzes at AlgoDaily. You could also pull in a friend to conduct a mock interview, speaking of which—

Mock interviews are key.

You must practice  some mock interviews before attending an actual interview. Ideally, this would simulate as much of the real interview as possible.

If it’s a whiteboard interview, grab a whiteboard and a knowledgeable friend, and force yourself to answer random algorithm/data structure questions from them.

Here are a few things to keep in mind while practicing mock interviews: 

  1. First, ensure that your friend or pairing partner is also a software engineer, preferably of the same level as you. He/she should be comfortable breaking down a problem into hints for you.
  2. Have a timer available. Limit it to 30 minutes as most companies’ interviews last around 45-60 minutes. This additional time will help boost your confidence for the actual interview day.
  3. Your mock interviewer should not be looking for the correct answer immediately. Have them evaluate your approach: did you ask the right questions to understand scope? Did you have a brute-force solution within the first 5 minutes? Did you write pseudocode to get your thoughts down? Are your test cases adequate and covering all edge cases?
  4. Ensure that the challenges being covered are among the more common ones to ensure you’re being efficient with study time. AlgoDaily’s free challenges can be useful for this.
  5. Write down all feedback and try to improve in the next mock interview.
  6. Also, take turns interviewing. Being in the interviewer’s seat will help you understand what companies are looking for when evaluating a candidate. It will also help you realize how difficult it is to be an interviewer, and ease some of the nerves when you realize they are working hard to help you solve the problem.

Check out HackerEarth for some fantastic resources that I’ve used when preparing for mock coding interviews. The competitions really help with time management and on-your-feet thinking that you’ll need. 

Best of luck and happy coding!

AlgoDaily provides a visual technical interview course.  HackerEarth members can email team@algodaily.com for a discount.

Hackerearth Subscribe

Get advanced recruiting insights delivered every month

Related reads

Top 10 HR Competencies to Build a Strong HR Department: A Comprehensive Guide
Top 10 HR Competencies to Build a Strong HR Department: A Comprehensive Guide

Top 10 HR Competencies to Build a Strong HR Department: A Comprehensive Guide

Introduction In today’s dynamic workplaces, a strong HR department is no longer a luxury – it’s a necessity. HR professionals play a crucial…

8 Steps for Conducting a Job Tasks Analysis: A Complete Guide
8 Steps for Conducting a Job Tasks Analysis: A Complete Guide

8 Steps for Conducting a Job Tasks Analysis: A Complete Guide

Job task analysis is a crucial process for understanding the specific duties and skills required for a particular role. By incorporating insights from…

Top 8 Sourcing Tools for Recruiters: A Comprehensive Guide
Top 8 Sourcing Tools for Recruiters: A Comprehensive Guide

Top 8 Sourcing Tools for Recruiters: A Comprehensive Guide

In today’s competitive talent landscape, attracting top candidates requires going beyond traditional job board postings. This is where effective sourcing tools comes into…

The 12 Most Effective Employee Selection Methods: A Comprehensive Guide
The 12 Most Effective Employee Selection Methods: A Comprehensive Guide

The 12 Most Effective Employee Selection Methods: A Comprehensive Guide

Finding the perfect fit for your team can feel like searching for a unicorn. But fret not, fellow recruiters! Here’s where employee selection…

12 Important Recruiting Metrics You Should Know
12 Important Recruiting Metrics You Should Know

12 Important Recruiting Metrics You Should Know

Recruitment forms a strong foundation to build an effective team. However, do you know if your recruitment strategy is working or not? This…

7 Modern Performance Appraisal Methods to Boost Workforce Development
7 Modern Performance Appraisal Methods to Boost Workforce Development

7 Modern Performance Appraisal Methods to Boost Workforce Development

Introduction Performance appraisal has seen a tremendous change over the years. It is no longer just a grading of employees once in a…

Hackerearth Subscribe

Get advanced recruiting insights delivered every month

View More

Top Products

Hackathons

Engage global developers through innovation

Hackerearth Hackathons Learn more

Assessments

AI-driven advanced coding assessments

Hackerearth Assessments Learn more

FaceCode

Real-time code editor for effective coding interviews

Hackerearth FaceCode Learn more

L & D

Tailored learning paths for continuous assessments

Hackerearth Learning and Development Learn more