#### Number of leaf nodes in a binary tree

Those nodes in the tree which don't have any child are known as leaf nodes i.e., A node …

Those nodes in the tree which don't have any child are known as leaf nodes i.e., A node …

The rightmost node among the leaf nodes is known as the deepest node in a binary tree. Find the deepest …

It is always recommended to store tokens for authentication as HttpOnly cookie instead of storing them in localStorage as a …

For authentication in a Single page application, it is a common approach to use token-based authentication where a token is …

Find the size of a Binary tree using recursion or iterative solution. For example, a binary tree contains the following …

Search a node in a Binary tree using recursion or iterative solution. For example, a binary tree contains the following …

Given an array write a program to rotate the array of size "n" to left/anticlockwise direction by "k" elements …

Find the maximum element in a Binary tree using recursion or iterative solution. For example, a binary tree contains the …

Given an array write a program to find the second largest element in an array by using the efficient possible …

Program to print reverse level order traversal of a binary tree i.e., print data in a binary tree from …

Binary tree traversals can be done by Depth-first traversal and Breadth-first traversals or Level order traversal. Preorder traversal, Inorder traversal …

A binary tree is a non-linear and hierarchical data structure which has zero children, one child or two children. An …

A tree is a non-linear data structures in which each node can point to a number of nodes. A tree …

In this problem, we have to find a pair of number in an unsorted array which adds up to the …

Next.js provides various ways to fetch data from an API or any other source. These methods can be used …

A Doubly Linked List is a linear data structure which collectively represents a sequence of data in which each node …

A Linked List or Singly Linked List is a linear data structure which collectively represents a sequence of data. In …

In this introduction part of the linked list, we will learn about the basics of a Linked List, like its …

Write a program to find the maximum area under histogram or largest rectangle in a histogram. It's optimized solution …

Write a program to find the nearest smaller element to the left of each element in an array.