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

101 articles

Validate Binary Search Tree in Python

Farhan Muhamed
Farhan Muhamed
Updated on 22-Aug-2025 1K+ Views

A binary search tree is a special binary tree in which 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 discuss how to validate whether a given binary tree is a valid binary search tree (BST) in Python. Validate Binary Search Tree Algorithm to Validate Binary Search Tree Python Program to Validate Binary Search Tree Validate Binary Search Tree Given a root node of ...

Read More

Verify Preorder Sequence in Binary Search Tree in C++

Farhan Muhamed
Farhan Muhamed
Updated on 22-Aug-2025 258 Views

In this article will explain a popular coding problem that involves verifying whether a given preorder sequence can represent a valid binary search tree (BST). We will discuss the problem statement, provide examples, algorithm to solve, and a C++ implementation of the solution. Problem Statement Algorithm to Solve Problem C++ Program Time and Space Complexity Verify Preorder Sequence in Binary Search Tree Given an array containing the preorder traversal of a binary tree, we need to verify whether it ...

Read More

Searching for minimum and maximum values in an Javascript Binary Search Tree

Farhan Muhamed
Farhan Muhamed
Updated on 20-Aug-2025 638 Views

In this article, we will explain how to find the minimum and maximum values in a binary search tree (BST), with implementation in JavaScript. 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. So the leftmost node will have the minimum value, and the rightmost node will have the maximum value. Find Minimum and Maximum in a BST Given root node of a binary search tree, ...

Read More

Python Program To Find the Smallest and Largest Elements in the Binary Search Tree

Farhan Muhamed
Farhan Muhamed
Updated on 19-Aug-2025 555 Views

In this article, we will explain how to find the minimum and maximum values in a binary search tree (BST), with implementation in Python. 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. So the leftmost node will have the minimum value, and the rightmost node will have the maximum value. Find Minimum and Maximum in a BST Given root node of a binary search tree, ...

Read More

Program to convert binary search tree to a singly linked list in C++?

Farhan Muhamed
Farhan Muhamed
Updated on 19-Aug-2025 720 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 discuss how to convert a Binary Search Tree (BST) into a singly linked list in C++. Flatten Binary Search Tree to Singly Linked List Given a Binary Search Tree, the goal is to convert it into a singly linked list where the linked list nodes are in the same order as the in-order ...

Read More

Print Common Nodes in Two Binary Search Trees in C++

Farhan Muhamed
Farhan Muhamed
Updated on 18-Aug-2025 333 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 solve the problem of finding common nodes in two binary search trees (BSTs). Find Common Nodes in BSTs In this problem, you are given two binary search trees (BSTs) and your task is to develop a program that finds all the common nodes between these two trees. In the other words, the intersection ...

Read More

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

Farhan Muhamed
Farhan Muhamed
Updated on 18-Aug-2025 355 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 solve the problem of finding all odd nodes of a binary search tree in C++. Find Odd-Valued Nodes in BST You are given a binary search tree (BST) as input and your task is to write a program that finds all the nodes with odd values and returns them as output. To understand ...

Read More

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 312 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 n Nodes In this problem, we are given an integer n, which represents the number of nodes in a binary search tree. The task is to find the number of different BSTs that can be formed using these n nodes and return the count. To understand the problem better, let's ...

Read More

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

Farhan Muhamed
Farhan Muhamed
Updated on 12-Aug-2025 460 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 of a binary search tree using C++. Find Even-Valued Nodes in BST You are given a binary search tree (BST) as input, and your task is to write a program that finds all the nodes with even values and returns them as output. To understand better, let's consider the ...

Read More

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

Farhan Muhamed
Farhan Muhamed
Updated on 07-Aug-2025 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 values less than the node's value, and the right subtree contains values greater than the node's value. Find Minimum Value in a Binary Search Tree Given the root node of a binary search tree, the task is to find the node with the minimum value in the tree. The ...

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