Farhan Muhamed

Farhan Muhamed

No Code Developer, Vibe Coder

About

Professional Technical Content Writer, SEO Analyst and Software Developer specialized in web development and DSA in C++, Python.
Drop your queries and messages here: x.com/farhan

101 Articles Published

Articles by Farhan Muhamed

Page 2 of 11

Find the Longest Common Substring using Binary search and Rolling Hash

Farhan Muhamed
Farhan Muhamed
Updated on 06-Aug-2025 546 Views

In this article, we will explain the concept of rolling hash and find the longest common substring using binary search and rolling hash. We will also provide a C++ code implementation for the same. Rolling Hash of a String Problem Statement Algorithm to Find the Longest Common Substring C++ Code Implementation Time and Space Complexity Rolling Hash of a String Rolling hash is a cryptographic technique used to calculate the hash value of a string. In this, we ...

Read More

Find the closest element in Binary Search Tree in C++

Farhan Muhamed
Farhan Muhamed
Updated on 05-Aug-2025 463 Views

In this article, we will learn to solve a popular problem that involves finding the closest element in a binary search tree (BST) to a given target value. There are two methods to solve this problem: Brute Force Method (Inorder Traversal) Optimized Method (DFS Traversal) Before moving to the solution, let's understand the problem statement in detail. Find the Closest Element in Binary Search Tree Given a binary search tree (BST) and a target value K, the task is to find a node in BST, whose value is ...

Read More

Find square root of number upto given precision using binary search in C++

Farhan Muhamed
Farhan Muhamed
Updated on 04-Aug-2025 2K+ Views

In this article, we will learn how to find the square root of a number up to a given precision by using binary search algorithm and implement it in C++. Before dive into the concept, make sure that you have a basic understanding of binary search algorithm. Square Root of a Number Upto a Given Precision In this problem, you are given a positive floating point number N and a positive integer P. The task is to find the square root of N up to P decimal places using binary search. Scenario 1 Input: N = ...

Read More

C++ code to find answers by vowel checking

Farhan Muhamed
Farhan Muhamed
Updated on 04-Aug-2025 305 Views

In this article, we will explain a beginner level problem that involves finding answers for questions by checking for vowels in the question text. We will implement a C++ program that solves this problem. Let's break down the problem statement below. Find Answers by Vowel Checking Amal and Bimal are playing a game. Amal will ask any questions whose answers will be either "Yes" or "No". If the question’s last letter is a vowel, then Bimal will answer "Yes" otherwise "No". You are given a string containing the question that Amal asks. Your task is to determine the answer ...

Read More

C++ code to find maximum fruit count to make compote

Farhan Muhamed
Farhan Muhamed
Updated on 31-Jul-2025 653 Views

In this article, we will explain maximum fruit count to make compote problem and implement a C++ program to solve it. The problem involves finding the maximum number of fruits that can be used to make a compote, given certain constraints. Let's break down the problem statement below. Maximum Fruit Count to Make Compote You are given a list of fruits, say a apples, b bananas, and c cherries, where a, b, and c are the counts of each type of fruit. Your task is to make a compote using these fruits such that the apples, bananas and cherries ...

Read More

C++ Program to Find Path Between Two Nodes in a Graph

Farhan Muhamed
Farhan Muhamed
Updated on 30-Jul-2025 1K+ Views

In this article, we will learn how to find a path between two nodes in an undirected graph and implement it in C++. We will represent graph as an adjacency list and use a depth-first search (DFS) algorithm to find the path. We already discussed finding a path between two nodes in a directed graph, check here. Finding Path Between Two Nodes in an Undirected Graph We have an adjacency list representation of an undirected graph adj[] and two nodes src and dest, our task is to write a program that finds the path between the src ...

Read More

C++ code to decrease even numbers in an array

Farhan Muhamed
Farhan Muhamed
Updated on 30-Jul-2025 389 Views

An array is a group of similar elements stored together in a single variable which take contiguous memory locations. Arrays help us to store and manage multiple values of the same type, like a list of numbers or names.In this article, we will solve a beginner level problem in C++ that involves decreasing all the even numbers in an array by 1. Program to Decrease Even Numbers in an Array How to Check a if Number is Even in C++? C++ Program to Decrease Even Numbers ...

Read More

Find if there is a path between two vertices in a directed graph

Farhan Muhamed
Farhan Muhamed
Updated on 30-Jul-2025 1K+ Views

A directed graph is a graph where the edges specify a direction from one vertex to another. In this article, we will learn how to find a path between two vertices in a directed graph and implement C++ code to achieve this. To determine if there is a path between two vertices, there are two common algorithms we can use: BFS Algorithm to Find Path Between Two Vertices DFS Algorithm to Find Path Between Two Vertices First of all, let's understand what does it meant by having a ...

Read More

Adjusting the heights of individual subplots in Matplotlib in Python

Farhan Muhamed
Farhan Muhamed
Updated on 25-Jul-2025 1K+ Views

The matplotlib is a library in Python that allows us to create graphs and plots for data visualization. This library provides several functions to adjust the height, width, and other layout properties of individual subplots in a figure. In this article, we will learn how to adjust the heights of individual subplots in matplotlib using Python. Subplots in Matplotlib Adjusting Heights of Subplots Using gridspec_kw Adjusting Heights of Subplots Using GridSpec Conclusion Subplots in Matplotlib A subplot is a smaller ...

Read More

Adjusting Text background transparency in Matplotlib

Farhan Muhamed
Farhan Muhamed
Updated on 25-Jul-2025 4K+ Views

The matplotlib is a library in Python that allows us to create graphs and plots for data visualization. This library have several built-in functions to style the plots, such as changing colors, adding titles, setting backgrounds, labels, and adjusting the layout of subplots. In this article, we will learn how to adjust the transparency of text backgrounds in matplotlib plots. Text Backgrounds in Matplotlib Adjusting Background Transparency of Title Text Adjusting Background Transparency of Labels Conclusion Text Backgrounds in Matplotlib ...

Read More
Showing 11–20 of 101 articles
« Prev 1 2 3 4 5 11 Next »
Advertisements