Farhan Muhamed has Published 147 Articles

C++ Program to Check whether Graph is a Bipartite using BFS

Farhan Muhamed

Farhan Muhamed

Updated on 17-Jul-2025 17:17:06

795 Views

The Breadth First Search (BFS) algorithm can be used to check whether a graph is bipartite by coloring the graph using two colors. This section will discuss how the BFS traversal can be used to check if a graph is bipartite. First of all, let's understand what a bipartite graph ... Read More

C++ Program to Find Chromatic Index of Cyclic Graphs

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jul-2025 18:20:22

639 Views

The chromatic index of a graph is the maximum number of color needed for the edge coloring of the graph, such that no two adjacent edges have the same color. It is also known as the edge chromatic number. A cyclic graph is a graph that contains at least one ... Read More

C++ Program to Find Inverse of a Graph Matrix

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jul-2025 16:24:13

9K+ Views

Every graph can be represented by a matrix called the adjacency matrix, in which each element indicates whether pairs of vertices have an edge between them. In this article, we will learn to find the inverse of a adjacency matrix of a graph using C++. First of all, let's understand ... Read More

How to initialize a dynamic array in C++?

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jul-2025 16:01:28

3K+ Views

Dynamic arrays are a type of array that can grow or shrink their size as elements are added or removed. They are created using pointers and memory management functions such as new and delete. In this article, we will learn different ways to initialize a dynamic arrays in C++. ... Read More

C++ Program to Implement Kadane’s Algorithm

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jul-2025 16:00:26

2K+ Views

The Kadane's algorithm is used to find the maximum subarray sum in a given array of integers. This section will explain the Kadane's algorithm with example and C++ implementation. Given an array of integers, our task is to find the maximum possible sum for a subarray using Kadane's algorithm. ... Read More

Adding Tuple to List and vice versa in Python

Farhan Muhamed

Farhan Muhamed

Updated on 15-Jul-2025 18:33:43

1K+ Views

In Python, both tuples and lists are used to store data in sequence. Python provides built-in functions and operators that allow us to easily add elements of a tuple into a list and elements of a list into a tuple. In this article, we will explain various methods to perform ... Read More

C++ Program to Implement Trie

Farhan Muhamed

Farhan Muhamed

Updated on 15-Jul-2025 18:04:38

1K+ Views

A Trie, also known as a prefix tree, is used to store and search for large sets of strings. In this section we will discuss all about Trie data structure, its operations, and how to implement it in C++. Trie Data Structure A Trie is a data structure similar ... Read More

Adding two Python lists elements

Farhan Muhamed

Farhan Muhamed

Updated on 14-Jul-2025 19:06:05

3K+ Views

In Python, a list is a built-in data structure that is used to store an ordered collection of multiple items in a single variable. Lists are mutable that means we can add, remove, and change its elements. In this article, we will learn how we can add the corresponding elements ... Read More

Check if a given graph is Bipartite using DFS in C++ program

Farhan Muhamed

Farhan Muhamed

Updated on 14-Jul-2025 19:05:23

658 Views

The Depth First Search (DFS) algorithm can be used to check whether a graph is bipartite by coloring the graph using two colors. This section will discuss how DFS traversal can be used to check if a graph is bipartite. First of all, let's understand what a bipartite graph is. ... Read More

Addition in Nested Tuples in Python

Farhan Muhamed

Farhan Muhamed

Updated on 14-Jul-2025 18:55:39

241 Views

In Python, tuples are used to store immutable sequence of elements. A nested tuple is a tuple that contains one or more tuples as their elements. For example: # A tuple in Python tup = ( 1, 2, 3, 4 ) # A nested tuple in Python nestedTup = ... Read More

Advertisements