Articles for category: Data Structures and Algorithms

What is Bipartite Graph?

A bipartite graph (also referred to as a bigraph), is a graph whose vertices can be segregated into two disjoint sets such that no two vertices in the same set have an edge between them. They are equivalent to two-colorable graphs (a graph that can be colored with two colors such that no two adjacent ...

What are the Types of Linked Lists in Data Structure?

Linked List is a linear data structure that consists of nodes. Each node in the linked list has both “data” and “links” i.e pointers of the next or previous nodes or both. These nodes are connected to the adjacent nodes using links or pointers. The nodes in the linked lists need not be stored at contiguous memory locations. This article mainly explains ...

What is the Structure or Format of Data Called?

The structure or format of data is called the Syntax, which is defined by various combinations of pre-defined symbols in a programming language. What is Syntax? A Syntax in a programming language is the set of rules that defines a particular language, by defining the correct arrangements of the symbols which are pre-defined in a particular language eg: “;” , “->” , ...

What is Hamming code?

When we are transmitting data from sender to receiver, there might be a chance of error in the data while transmitting, Hamming code is the set of codes that helps in error detection as well as error correction in the data during transmission. The prerequisite for understanding the basics of error detection and correction can ...

Which Data Structure May Produce an Overflow Error?

Overflow error is an error that happens when a program receives a number, value or variable outside the scope of its ability to handle. Takeaways A linear queue can throw an Overflow error even if it has empty spaces for elements in it. Which Data Structure May Produce an Overflow Error? Correct Answer a. A Linear Queue can produce an ...

Word Break Problem

Problem Statement In the word break problem, you will be given a string, say s, and a dictionary of strings say wordDict. The wordDict will contain several strings. Now, our job is to determine if we can break or segment the string using the words in the dictionary. If we can do that, then we return a True, otherwise, ...

What are the Advantages of Data Structure?

Before learning about the advantages of data structure, we should first understand a data structure and a data type and why we need them. Data types are nothing but the classification or categorization of the data items. Data types represent the kind of value and also tell what operations can be performed on a particular data. Various programming ...

What is Gray Code?

Gray code is basically a binary number system in which the successive binary numbers differ by exactly one bit. We can write a sequence of binary numbers for any K bits as a grey code sequence.For example, the sequence of 3-bit binary numbers is 000,001,011,010,110,111,101,100 where each consecutive numbers differ by exactly one bit. Unlike ...