Farhan Muhamed has Published 147 Articles

Addition of tuples in Python

Farhan Muhamed

Farhan Muhamed

Updated on 14-Jul-2025 18:54:28

2K+ Views

In Python, tuples are used to store an immutable sequence of elements. In this article, we will learn different methods to implement a Python program to add corresponding elements of tuples. Here, you are given two equally sized tuples in Python and your task is to create a new ... Read More

Additive Secret Sharing and Share Proactivization ñ Using Python

Farhan Muhamed

Farhan Muhamed

Updated on 11-Jul-2025 18:24:17

571 Views

Additive Secret Sharing and Share Proactivization are cryptographic techniques to share a password or other confidential data among a group of people. In this article, we will explain these techniques and implement Python code to demonstrate them. Additive Secret Sharing Additive secret sharing is a technique used in cryptography ... Read More

C++ Program to Perform Finite State Automaton based Search

Farhan Muhamed

Farhan Muhamed

Updated on 18-Jun-2025 19:18:27

856 Views

An automaton with a finite number of states is called a Finite Automaton. We can use a Finite State Automaton (FSA) to perform optimized pattern search operation on a string. This article will discuss how to implement a Finite State Automaton based search in C++. Problem Statement: Given two ... Read More

C++ Program to Solve N-Queen Problem

Farhan Muhamed

Farhan Muhamed

Updated on 17-Jun-2025 19:15:44

13K+ Views

The N-Queens problem is a puzzle where we need to place N queens on an N x N chessboard such that no two queens attack each other. A queen will attack another queen if they are in the same row, column, or diagonal. In this problem, you are given a ... Read More

Program to check if three points are collinear in C++

Farhan Muhamed

Farhan Muhamed

Updated on 17-Jun-2025 19:15:26

3K+ Views

Given coordinates of three points in 2D plane, and the task is to check whether the points are collinear or not. For Example, // Input: Coordinates of three points points = {{2, 3}, {4, 6}, {6, 9}}; // Output The points are collinear. What are ... Read More

C++ Program to Implement the Vizing’s Theorem

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jun-2025 18:14:31

278 Views

In this article, we will explain the Vizing's theorem and implement it in C++ to color a graph using the Greedy Coloring Algorithm. What is Vizing's Theorem? Vizing's theorem states that for any graph, the minimum number of colors needed to color the edges (chromatic index) is either equal ... Read More

C++ Program to Check Cycle in a Graph using Topological Sort

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jun-2025 18:14:11

449 Views

In this problem, we are given adjacency lists of a directed graph and we need to check if there is a cycle in the graph using topological sort. If a cycle exists, it is not possible to perform a topological sort. Example: // Input Graph ( as adjacency list ... Read More

C++ program to Implement Threaded Binary Tree

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jun-2025 18:10:10

4K+ Views

Threaded binary tree is a binary tree that provides the facility to traverse the tree in a particular order. In this article, we will learn all about threaded binary trees, their types, and how to implement them in C++. What is a Threaded Binary Tree? A threaded binary tree ... Read More

C++ Program to Find All Forward Edges in a Graph

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jun-2025 18:09:57

311 Views

In this article, we will learn how to write an algorithm an C++ code to find all forward edges in a directed graph. What is a Forward Edge? A forward edge is an edge in a directed graph that points from a node to one of it's descendants in ... Read More

C++ Program to Check if a Given Set of Three Points Lie on a Single Line or Not

Farhan Muhamed

Farhan Muhamed

Updated on 16-Jun-2025 18:09:45

795 Views

In this problem, you are given three coordinates in a 2D plane, and you need to check if these three points are collinear, meaning they lie on a single straight line. There are two approaches to solve this problem. In this article, we will explain both the approaches with example ... Read More

Previous 1 ... 3 4 5 6 7 ... 15 Next
Advertisements