Blog

Degree of Array – Interview Question

Find the degree of an array where degree of an array is the maximum frequency of any element in the array. Also find the smallest possible sub-array with the same degree. To begin with, make sure you understood the question correctly. Write a sample array on the whiteboard and ask them if the degree you…
Read more


November 9, 2018 0

Are Characters Unique in a String – Interview Question

Does a string have all unique characters? Let’s find out how to answer this question in a technical interview The first solution that comes to mind is to have two for loops. In the outer for loop, you pick one character from the string, let’s call it c1. You then compare c1 to rest of…
Read more


October 28, 2018 0

Find Middle Element in a Linked List – Interview Question

Find out middle element in a linked list. Let’s see how to answer this question in a technical interview. To begin with you can draw a linked list on the whiteboard. A linked list has nodes in it which are connected to each other. Each node has two components: the value and reference to next…
Read more


October 12, 2018 0

Rotate Elements in Matrix – Interview Question

Rotate Elements in a Matrix. Let’s find out how to answer this question in a technical interview. Let’s take a sample matrix 1     2      3      4 5     6      7      8 9     10    11    12 13   14    15    16   If we rotate it, this is how it will look like 5      1      2      3 9    …
Read more


September 26, 2018 0

How HashTables Work

How do Hash Tables Work? To Begin with, what is a HashTable? Simply, it is a data structure that can map keys to values. Why is it important? You can look up the data in constant time i.e. O(1). How does it work? Internally, it’s an array of buckets or slots. There is something called Hash…
Read more


September 13, 2018 0

Find Triplet in Array that sum to a Given Value

In today’s post, I will be discussing an interview question related to arrays. This is similar to my previous post, in which I discussed how to find a pair with a given sum in an array. Suppose you are given an array. [1,9,7,6,3,5,2,8] And you are given a targetSum = 10. You have to find…
Read more


September 3, 2018 0

Find If Pair in An Array Exists That Sum to a Specific Value

In today’s post, I will be discussing an actual interview question related to arrays. Suppose, you are given an array like this: [2, 9, 5, 6, 3, 8, 2] and you have to find out if a pair exists in the array such that their sum equals 9. As a candidate, you need to understand…
Read more


August 17, 2018 0

Array Data Structure For Cracking Technical Interviews

In today’s blog post, i am discussing the basics of array data structure for cracking technical interviews. Array Data Structure An array is a collection of items stored in contiguous memory locations. All the items stored in an array are usually of same data type. Arrays are the oldest and most important data structure and…
Read more


August 7, 2018 0

Areas to Master for Cracking Technical Interviews as Experienced Engineer

In my previous post here, we discussed about the areas you need to master as a newbie. The areas like Algorithms, data structures, language specific questions, how web works and behavioral questions. As a senior engineer, you need to master all those areas plus a few more. Many times, people say that I am already…
Read more


July 26, 2018 0

Areas to Master For Cracking Technical Interviews As Newbie

In today’s blog post, I will be discussing the areas you need to master in order to crack technical interviews as a newbie. First & foremost is data structures. You need to be very comfortable with different data structures. The main ones are: Array, Linked List, Stacks, Queues, HashMap, Graphs and Trees. You need to…
Read more


July 16, 2018 0