A binary search tree (BST) is a type of binary tree where every node has at most two children, commonly referred to as the left child and the right child. In this Golang article, we will learn how to find floor and ceil in binary search tree using recursion and iterative method. The binary search tree is a useful data structure for efficient searching, insertion, and deletion of elements. Syntax func ceil(root *Node, val int) int {…} The ceil() function is used to find the ceil value in the binary search tree. func floor(root *Node, val int) int {…} ... Read More
We will use the g++ header file to compile the code in C++ compiler. g++ is a Linux based header file that is used in C++ to compile the code of policy based data structure. The policy based data structure are such structures used for high performance and flexibility of the code. As these data structures are so resourceful that we can use them for many functions like searching the index of an element, inserting the element into the index position, removing the element from the range of index, etc. Example Let’s take an example of inversion count − Suppose ... Read More
A linked list is a data structure consisting of a collection of nodes, where each node contains a value and a pointer to the next node in the list. In this Golang article, we will learn how to reorder list using recursion along with some helper functions. Syntax func reorderList(head *Node) {…} The reorderList() function is used to reorder list using recursion. It takes pointer to the head node as its argument. Algorithm Step 1 − First, we need to import the fmt package. Step 2 − Now, create a struct of a single node of the ... Read More
In this Golang article, we are going to find the diameter of a tree by using recursion and iterative method. The diameter of a tree is the number of nodes on the longest path between any two leaves in the tree. Syntax func diameter(root *node) int{…} The diameter() function is used to find the diameter of a tree. It takes pointer to the root node as its argument. Algorithm Step 1 − First, we need to import the fmt package. Step 2 − Now, create a struct of a single node of the tree named, node. It contains ... Read More
In this Golang article, we are going to delete duplicate value nodes from a sorted linked list by using recursion and iterative method. A linked list is a data structure consisting of a collection of nodes, where each node contains a value and a pointer to the next node in the list. Syntax func deleteDuplicates(head *Node) *Node{…} The deleteDuplicates() function is used to delete duplicate value nodes from a sorted linked list. It takes pointer to the head node as its argument. Algorithm Step 1 − First, we need to import the fmt package. Step 2 − Now, ... Read More
Resistance and reactance are the two major parameters of an electric circuit element that together form the impedance of the circuit element. One most significant difference between resistance and reactance is that the resistance is the opposition in the flow of electric current offered by a circuit element called resistor, whereas the reactance is the opposition in the change in the magnitude and direction of the current and voltage offered by a circuit element called inductor or capacitor. The combined opposition offered by the resistance and reactance in an electric circuit is known as impedance of the circuit. In this ... Read More
In this Golang article, we will learn how to print left Pascal’s triangle by using recursion and iterative method. Pascal's triangle is a triangular array of binomial coefficients. The left pascal's triangle is a variant of Pascal's triangle that is obtained by reflecting Pascal's triangle along a vertical axis. Syntax func leftPascal(n, k int) int{…} The leftPascal() function is used to print left Pascal’s triangle. It takes two arguments as input. func leftPascal(n int){…} The leftPascal() function is used to print left Pascal’s triangle. It takes one argument, number of rows as input. Algorithm Step 1 − ... Read More
Introduction Chemical engineering is a branch of engineering that deals with the design, development, and implementation of chemical processes to produce a range of products, including pharmaceuticals, fertilizers, food, fuel, and other chemical products. The field is highly interdisciplinary, combining elements of chemistry, physics, biology, and math to design and optimize chemical processes. The scope of chemical engineering is vast, covering all aspects of the chemical industry, including research and development, design and construction of chemical plants, and operation and management of chemical processes. This article enlightens on what chemical engineering is, its scope, and its importance in various ... Read More
Introduction Bioprocessing is a versatile process that uses living organisms, such as bacteria, yeast, and fungi, to produce a wide range of products. These products can be anything from food and beverages to pharmaceuticals and industrial chemicals. Bioprocessing has been gaining popularity in recent years due to its many benefits. In this article, we will explore the benefits of bioprocessing in detail. Environmentally Friendly One of the primary benefits of bioprocessing is that it is environmentally friendly. Unlike traditional manufacturing processes, bioprocessing uses natural resources to produce products. For example, the production of industrial chemicals through traditional methods requires ... Read More
Introduction Plant tissue culture is a valuable tool for plant propagation, conservation, and genetic improvement. It involves the cultivation of plant cells, tissues, and organs in vitro under sterile conditions. The technique was first developed in the 1950s and has since then revolutionized the field of plant biology. The ability to manipulate plants at the cellular level has paved the way for genetic engineering, plant breeding, and the production of high-value plant-based products. Plant tissue culture laboratories are specialized facilities designed to provide a controlled environment for the growth of plant tissue cultures. The content below lists the ... Read More