All content related to coding-interview-concepts

Introduction to Data Structures: Types, Classifications and Applications

The code structure of a well-designed algorithm using data structure is just like a structure of a good house. So a design of an algorithm must be based on a good understanding of data structures: properties, structure, implementation techniques, and efficiency of its critical operations. The fact is: Data structures are the core building blocks of algorithms and real-life applications.

Binary Indexed Tree or Fenwick Tree

A Fenwick tree or Binary indexed tree is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers. Boris Ryabko proposed this structure in 1989, with a further modification published in 1992.

Dynamic Array

In computer science, a dynamic array is a random access, the variable-size data structure that allows elements to be added or removed. It is supplied with standard libraries in many modern mainstream programming languages.

Array In Data Structures

An array is a contiguous block of memory of the same type of elements where the size is equal to the number of elements in that array, which must be fixed. It is a structure of data such that each element can be efficiently located by its index or memory address.

Introduction to Heap Data Structure

A heap is a complete binary tree structure where each element satisfies a heap property. We learn two types of the heap in programming: 1) max-heap, which satisfies max heap property 2) min-heap, which satisfies min heap property.

Sorting Algorithms Comparison

Comparison of sorting algorithms based on different parameters helps us choose an effcient sorting method in various problem-solving scenarios. You will get an answer to the following questions: how to compare two sorting algorithms? Which sorting is best in terms of properties like efficiency, in-place, stability, online vs. offline, etc.

Introduction to Hashing

Hashing is an effcient searching technique that maps keys and values into the hash table using a hash function. Explore this blog to learn: how do we perform hash mapping in data structures? How do hash maps work? What are some popular hash functions in programming?

Recursive Tree Traversals of a Binary Tree: Preorder, Inorder and Postorder Traversal

To process data stored in a binary tree, we need to traverse each tree node, and the process to visit all nodes is called binary tree traversal. In this blog, we will be discussing three popular recursive tree traversals: preorder, inorder and postorder traversals. These traversals are also called depth-first search traversal or dfs traversal in data structures.

Iterative Binary Tree Traversal using Stack: Preorder, Inorder and Postorder

In recursive DFS traversals of a binary tree, we have three basic elements to traverse— root, left subtree, and right subtree. The traversal order depends on the order in which we process the root node. Here recursive code is simple and easy to visualize — only one function parameter and 3–4 lines of code. So critical question would be — How can we convert it into iterative code using stack? To simulate the recursive traversal into an iterative traversal, we need to understand the flow of recursive calls.

Level Order Traversal of a Binary Tree :  Breadth First Search

Level order traversal accesses nodes in level by level order. This is also called breadth-first search traversal or BFS traversal. Here we start from the root node and process it, then process all the nodes at the first level, then process all the nodes at the second level, and so on. In other words, we explore all nodes at the current level before moving on to the nodes at the next level.

Time complexity analysis in Data Structure and Algorithms

Explore this blog to answer these questions related to complexity analysis: why time complexity analysis is important? What are the criteria to define the complexity of an algorithm? How do we analyze the time complexity of an algorithm? How do we represent algorithm time complexity in the form of big O notation?

Analysis of Recursion in Data Structure and Algorithms

Learning analysis of recursion is critical to understand the time complexity analysis of recursive algorithms. We will discuss these concepts related to the recursion analysis: Recurrence relations of recursive algorithms, steps to analyze the time complexity of recursion, Recursion tree method, and master theorem to analyze divide and conquer algorithms.

Analysis of loop in Programming

There are several loop patterns in programming like a loop running constant time, a loop running n times, a loop growing exponentially, a loop running based on the specific condition, consecutive single loops, two nested loops, three nested loops, consecutive single loop with nested loops, etc. So for designing a better algorithm or optimizing the code, we should learn to analyze the time complexity of the loop in terms of Big-O notation.

Introduction to Sorting Algorithms: Bubble Sort, Selection Sort and Insertion Sort

Sorting algorithms are the most fundamental problems to study in data structure and algorithms. But the critical question is - why we learn the design, code, and analysis of the sorting algorithms? Explore and Think!

Iteration and Loop in Programming

Iteration is a process to repeat a sequence of code instructions a specified number of times or until a specific condition is met. It helps us to solve several coding problems in data structure and algorithms. We implement iteration using the two most common types of loops in programming languages: the while loop and the for loop.

Step by Step Guide for Cracking the Coding Interview

A comprehensive guide to master data structures and algorithms and crack the coding interview. This could help programmers prepare a step-by-step learning plan for the coding interview preparation. Explore and Enjoy!

What is an Algorithm? Properties and Applications of Algorithms in real life

The concept of algorithm is essential for building high-performance software applications and cracking the coding interview to get a high-paying job in the software industry. So learning data structure and algorithms is one of the important career skills for programmers. Definition of the algorithm: An algorithm is a step-by-step procedure to transform a given input to the desired output and solve a computational problem.

Recursion Explained: How recursion works in Programming?

Recursion means solving the problem via the solution of the smaller sub-problem. This blog will answer some critical questions like - what is recursion? What are its advantages and disadvantages? How do you identify recursion problems? What is the difference between recursion and iteration? etc.

How to develop algorithmic thinking in data structure and algorithms?

Algorithmic thinking definition: It is a method for solving algorithms and data structure problems based on a clear definition of the steps logically and repeatedly. Therefore, thinking algorithmically is essential for learning data structures and algorithms and solve various coding interview questions.

Why should we learn data structures and algorithms?

There are four critical importance to learn data structures and algorithms: 1) An algorithm is a technology 2) It is at the core of library functions and several APIs 3) For cracking the coding interview 4) Algorithms are beautiful! This blog answer one of the critical questions: how do we develop a long-term motivation to learn data structures and algorithms?

Our weekly newsletter

Subscribe to get free weekly content on data structure and algorithms, machine learning, system design, oops and math. enjoy learning!