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 8 of 11

C++ Program to Perform Right Rotation on a Binary Search Tree

Farhan Muhamed
Farhan Muhamed
Updated on 16-May-2025 1K+ Views

Binary Search Tree (BST) is a special binary tree in which the left subtree of a node contains only nodes with values less than the node's value, and the right subtree contains only nodes with values greater than the node's value. In this article, we will learn how to perform a right rotation on a BST node using C++. What is Right Rotation in BST? Right rotation is a type of tree rotation technique that is used to balance a binary search tree. In the right rotation around a node, the node is moved to the right in such ...

Read More

C++ Program to Perform Postorder Non-Recursive Traversal of a Given Binary Tree

Farhan Muhamed
Farhan Muhamed
Updated on 16-May-2025 692 Views

Binary Tree traversal is a process of visiting all the nodes in a certain order. In this article, we will learn how to perform postorder non-recursive traversal of a binary tree using two stacks in C++. What is Postorder Non-Recursive Traversal? Postorder traversal is a type of depth-first traversal where we first visit the left subtree, then the right subtree, and then the root node. In a non-recursive approach, we are not allowed to use recursive functions to track nodes for traversing the tree. Instead, we can use stack data structures to manually keep track of the nodes. This ...

Read More

C++ Program to Perform Inorder Non-Recursive Traversal of a Given Binary Tree

Farhan Muhamed
Farhan Muhamed
Updated on 15-May-2025 918 Views

Binary Tree traversal is a process of visiting all the nodes in a certain order. In this article, we will learn how to perform inorder non-recursive traversal of a binary tree using a stack in C++. What is Inorder Non-Recursive Traversal? Inorder traversal is a type of tree traversal, where we first visit the left subtree, then the root node, and then the right subtree. In a non-recursive approach, we are not allowed to use recursive functions to track nodes for traversing the tree. Instead, we can use an explicit stack data structure to track nodes and traverse through ...

Read More

C++ Program to Perform Dictionary Operations in a Binary Search Tree

Farhan Muhamed
Farhan Muhamed
Updated on 15-May-2025 2K+ Views

A dictionary is a collection of key-value pairs where, keys are unique and used to identify corresponding values in the dictionary. In this article, we will learn how to perform dictionary operations such as insertion, search, and traversal using a binary search tree (BST) in C++. What is BST? A binary search tree (BST) is a tree data structure, where each node has at most two children and follows two rules: the left subtree contains keys less than the node’s key, and the right subtree contains keys greater than the node’s key. This structure is same as how a ...

Read More

C++ Program to Implement Set_Union in STL

Farhan Muhamed
Farhan Muhamed
Updated on 13-May-2025 890 Views

The Set Union is an operation used to find all elements that are present in either of the sets or in both. In this article, we will learn how to use the set_union algorithm from the Standard Template Library (STL) in C++ to find the union of two sets. What is Set Union? The set union is an arithmetic operation performed between two sets to find all elements that are present in either of the sets or in both. In C++, we have set_union which is a built-in algorithm provided by C++ STL that computes the union of two ...

Read More

C++ Program to Implement Vector in STL

Farhan Muhamed
Farhan Muhamed
Updated on 13-May-2025 688 Views

Vector is a special type of array in C++, which have ability to resize itself automatically during insertion and deletion of elements.. In this article, we will learn how to use the vector container from the Standard Template Library (STL) in C++. What is a Vector? A vector is a container that stores data elements in a dynamic contiguous memory. It is similar to arrays but can change its size dynamically during execution. Meaning, we doesn't need explicitly mention the size of a vector, it will be calculated automatically by counting number of elements in it. Similar to arrays, ...

Read More

C++ Program to Implement Set_Difference in STL

Farhan Muhamed
Farhan Muhamed
Updated on 12-May-2025 1K+ Views

The Set Difference is an operation used to find all elements present in the first set but not in the second. In this article, we will learn how to use the set_difference algorithm from the Standard Template Library (STL) in C++ to find the difference of two sets. What is Set Difference? The set difference is an arithmetic operation performed between two sets to find all elements present in the first set but not in the second. In C++, we have set_difference which is a built-in algorithm provided by C++ STL that computes the set difference of two sorted ...

Read More

C++ Program to Implement Set_Intersection in STL

Farhan Muhamed
Farhan Muhamed
Updated on 12-May-2025 859 Views

The Set Intersection is an operation used to find all elements that are common in both sets. In this article, we will learn how to use the set_intersection algorithm from the Standard Template Library (STL) in C++ to find the intersection of two sets. What is Set Intersection? The set intersection is an arithmetic operation performed between two sets to find all elements that are common in both sets. In C++, we have set_intersection which is a built-in algorithm provided by C++ STL that computes the intersection of two sorted ranges of sets. That is, it returns the elements ...

Read More

C++ Program to Implement Prev_Permutataion in STL

Farhan Muhamed
Farhan Muhamed
Updated on 09-May-2025 306 Views

The Prev permutation is an algorithmic operation that rearranges the elements of an array or a range of an array into the previous lexicographically smaller permutation. In this article, we will learn how to use the prev_permutation() function from the Standard Template Library (STL) in C++. What is Prev Permutation? The Prev Permutation is an operation used to generate all the possible permutations of an array in reverse lexicographical order. A permutation is one of the N! arrangements of the elements in an array of size N. The STL library of C++ provide a pre-defined function for performing the ...

Read More

C++ Program to Implement List in STL

Farhan Muhamed
Farhan Muhamed
Updated on 06-May-2025 560 Views

A List in C++ STL library is hardcoded implementation of a doubly linked list data structure. In this article, we will learn how to implement and use a list in C++ . What is List? List is a doubly linked container provided in the C++ STL library, in which each element points to both its previous and next elements. Meaning, in this list we can quickly traverse in both forward and backward direction using pointers just like a doubly linked list. Compared to vectors or arrays, these lists allow fast insertions and deletions from the middle of the sequence. ...

Read More
Showing 71–80 of 101 articles
« Prev 1 6 7 8 9 10 11 Next »
Advertisements