Farhan Muhamed has Published 58 Articles

C++ Program to Perform Edge Coloring to the Line Graph of an Input Graph

Farhan Muhamed

Farhan Muhamed

Updated on 02-May-2025 18:28:05

323 Views

Edge coloring is a method of coloring the edges of a graph, such that no two edges having a common vertex is colored with same color. A line Graph is a special type of graph which help us to assume an edge-coloring problem into a vertex-coloring problem. In other words, ... Read More

C++ Program to Perform Graph Coloring on Bipartite Graphs

Farhan Muhamed

Farhan Muhamed

Updated on 02-May-2025 18:27:53

449 Views

Graph coloring is a technique in which, we assign colors to the vertices of a graph such that no two adjacent vertices have same color. Bipartite graph a special kind of graph which is possible to color by just two colors. In this article, we will discuss how to perform ... Read More

What is a segmentation fault in C/C++ program?

Farhan Muhamed

Farhan Muhamed

Updated on 02-May-2025 18:27:39

1K+ Views

In C++, segmentation fault is a runtime error that occur when your program attempts to access an area of memory that it is not allowed to access. In other words, segmentation fault occur when your program tries to access memory that is beyond the limits that the operating system allocated ... Read More

How to pass objects to functions in C++ Program?

Farhan Muhamed

Farhan Muhamed

Updated on 02-May-2025 18:26:45

9K+ Views

The C++ functions can receive objects in multiple ways, depending upon how you want the function to interact with the object. You can either define functions that can modify the original objects or define functions that will make a copy of original object and modify the copy without affecting ... Read More

C++ Program to Find the Longest Increasing Subsequence of a Given Sequence

Farhan Muhamed

Farhan Muhamed

Updated on 30-Apr-2025 20:33:38

927 Views

A subsequence is a sequence that can be derived from another sequence by deleting some elements and without changing the order of elements in sequence. For example, the sequences [3, 10], [3, 2, 20] and [3, 10, 20] are some of the subsequences of [3, 10, 2, 1, 20]. ... Read More

Replace part of a string with another string in C++

Farhan Muhamed

Farhan Muhamed

Updated on 24-Apr-2025 10:12:24

6K+ Views

In this article, we will learn the different approaches to replace a part of a string with another string using a C/C++ program. The problem statement of this program is explained below: The input of this problem will be three strings. The task is to replace all the occurrence ... Read More

Remove Trailing Zeros from string in C++

Farhan Muhamed

Farhan Muhamed

Updated on 23-Apr-2025 18:48:44

4K+ Views

Trailing zeros are the zero occuring at the end of a string. In this article, we will discuss different approaches to remove trailing zeros from a string. The below section explains the problem statement. The input of this problem is a non-empty string containing characters and numbers. Our ... Read More

Remove spaces from std::string in C++

Farhan Muhamed

Farhan Muhamed

Updated on 23-Apr-2025 18:48:16

17K+ Views

In this article, we will learn all the different approaches to remove the whitespaces from a standard string in C/C++. First of all, let's understand our problem statement. The input of this problem is a non-empty string containing multiple characters and whitespaces between those characters. Our task is to print ... Read More

Parsing a comma-delimited std::string in C++

Farhan Muhamed

Farhan Muhamed

Updated on 23-Apr-2025 18:47:30

8K+ Views

In this article, we will discuss all the approaches to parse a string delimited by comma using a C/C++ program. First of all, let's understand the problem statement. The input of this problem is a string containing multiple words that are seperated by commas. Our task is to print ... Read More

How to concatenate a std::string and an int in C++?

Farhan Muhamed

Farhan Muhamed

Updated on 22-Apr-2025 19:07:38

2K+ Views

Concatenate a string and an integer means, convert both the string and integer to a single string. In this article we will discuss all the approches to concatenate a std:string and an integer type using C/C++ program. First of all, let's understand the problem statement. We are given a standard ... Read More

Advertisements