Articles for category: Data Structures and Algorithms

How to Master Data Structures and Algorithms?

Data Structures and algorithms is one of the most important topics that you need to have knowledge of along the path of being a software developer. The knowledge of this topic helps solve problems much more easily in the real world. It’s a skill that comes with practice. In this article, I will speak about the best ...

Height of Tree

A tree is a nonlinear hierarchical data structure that consists of nodes connected by edges. The most common type of tree is the binary tree. In this, each node has 2 children, i.e., Left and Right. The node that doesn’t have any parents is known as the root node, and the node that doesn’t have any children nodes is known as the leaf node. ...

Dictionary in Data Structure

A dictionary in data structure is used to store the data in the form of key-value pair. The dictionary in data structure has an attribute called the key. The key is the attribute that helps us locate the data or value in the memory. A dictionary in data structure supports a wide variety of operations using a wide ...

Difference Between Algorithm and Flowchart

The difference between algorithm and flowchart is simply that algorithm is the collection of rules that should be followed while solving any particular problem. flowchart is diagrammatic representation of the algorithm. What is Algorithm? Let’s understand what an algorithm is to clarify the difference between algorithm and flowchart. An algorithm is a method for solving a problem step by step. An algorithm is a set ...

Difference Between BFS and DFS

The Difference Between BFS and DFS lies in their traversal methods. BFS explores nodes level by level, making it ideal for finding the shortest path. In contrast, DFS explores, as far as possible, each branch suited for topological sorting and detecting cycles. What is BFS? Breadth-First Search (BFS) is a vertex-based algorithm used to find the ...

Delete a Node from Linked List

A linked list is a linear data structure that consists of nodes where each node has two fields. The first field is the data field, and the second field is the address field, which is a reference(link) to the next node. We can perform various functions in a linked list, like insertion, deletion, searching, sorting, and many ...

Arithmetic Progression

A progression is a sequence of numbers that shows a pattern. The arithmetic progression is the most widely used mathematical progression, and it occurs when the difference between every two consecutive terms in a series is same. It is also known as an arithmetic sequence. Let’s say we have a series of even numbers (2, ...