Farhan Muhamed has Published 147 Articles

Python Program for Binary Search

Farhan Muhamed

Farhan Muhamed

Updated on 22-Aug-2025 15:53:46

6K+ Views

The binary search algorithm is the fastest algorithm to search for an element in a sorted array. It works by dividing the array into two halves and checking if the target element is in the left or right half, thus reducing the search space by half with each iteration. ... Read More

Validate Binary Search Tree in Python

Farhan Muhamed

Farhan Muhamed

Updated on 22-Aug-2025 15:53:32

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

Verify Preorder Sequence in Binary Search Tree in C++

Farhan Muhamed

Farhan Muhamed

Updated on 22-Aug-2025 15:53:17

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

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

Farhan Muhamed

Farhan Muhamed

Updated on 20-Aug-2025 17:37:29

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

Python Program to Implement Binary Search with Recursion

Farhan Muhamed

Farhan Muhamed

Updated on 20-Aug-2025 17:36:53

4K+ Views

The binary search algorithm is the fastest algorithm to search for an element in a sorted array. It works by dividing the array into two halves and checking if the target element is in the left or right half, thus reducing the search space by half with each iteration. ... 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 17:27:50

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

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

Farhan Muhamed

Farhan Muhamed

Updated on 19-Aug-2025 17:27:40

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

Unique Binary Search Trees in C++

Farhan Muhamed

Farhan Muhamed

Updated on 19-Aug-2025 17:27:24

238 Views

The Unique Binary Search Trees problem is a classic dynamic programming problem that counts the number of unique binary search tree (BSTs) that can be formed with a given number of nodes. In this article, we will explain the problem, testcases, its solution, and provide a C++ implementation. Number ... Read More

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

Farhan Muhamed

Farhan Muhamed

Updated on 18-Aug-2025 11:30:36

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

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

Farhan Muhamed

Farhan Muhamed

Updated on 18-Aug-2025 11:30:02

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

1 2 3 4 5 ... 15 Next
Advertisements