Farhan Muhamed has Published 147 Articles

Program to count number of unique binary search tree can be formed with 0 to n values in Python

Farhan Muhamed

Farhan Muhamed

Updated on 18-Aug-2025 11:28:58

239 Views

In this article, we will discuss a problem that involves counting the number of unique binary search tree (BSTs) that can be formed with a given number of nodes. We will explain the problem, testcases, its solution, and provide a Python implementation. Number of Unique Binary Search Trees For ... Read More

iswalpha() function in C++ STL

Farhan Muhamed

Farhan Muhamed

Updated on 12-Aug-2025 17:16:47

231 Views

The iswalpha() function is an extension of the isalpha() function, which supports character identification of all languages. In this article, we will learn how to use the iswalpha() function from the Standard Template Library (STL) in C++. What is iswalpha()? The iswalpha() function is used to check whether a given ... Read More

Print all even nodes of Binary Search Tree in C++

Farhan Muhamed

Farhan Muhamed

Updated on 12-Aug-2025 17:00:45

391 Views

A Binary Search Tree is a data structure that stores data in a sorted order such that for every node, the left subtree contains values less than the node's value, and the right subtree contains values greater than the node's value. In this article, we will find all even nodes ... Read More

Optimal Binary Search Tree

Farhan Muhamed

Farhan Muhamed

Updated on 12-Aug-2025 16:23:36

8K+ Views

In this article, we will discuss a classic Dynamic Programming problem that involves constructing an optimal binary search tree for a given set of keys with their search probabilities. Before diving into the problem, let us understand what are Binary Search Trees and Dynamic Programming. Optimal Binary Search Tree Problem ... Read More

Find the node with minimum value in a Binary Search Tree in C++

Farhan Muhamed

Farhan Muhamed

Updated on 07-Aug-2025 16:00:04

3K+ Views

In this article, we will explain how to find the node with the minimum value in a binary search tree (BST) and provide a C++ implementation. A binary search tree is a data structure that stores data in a sorted order such that for every node, the left subtree contains ... Read More

Find the Longest Common Substring using Binary search and Rolling Hash

Farhan Muhamed

Farhan Muhamed

Updated on 06-Aug-2025 18:37:49

452 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 ... Read More

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

Farhan Muhamed

Farhan Muhamed

Updated on 05-Aug-2025 18:08:53

376 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) ... Read More

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

Farhan Muhamed

Farhan Muhamed

Updated on 04-Aug-2025 19:02:57

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. ... Read More

C++ code to find answers by vowel checking

Farhan Muhamed

Farhan Muhamed

Updated on 04-Aug-2025 19:02:44

241 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 ... Read More

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

Farhan Muhamed

Farhan Muhamed

Updated on 31-Jul-2025 17:02:43

592 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 ... Read More

Advertisements