Number of full nodes in a binary tree

Those nodes in the tree which have both the children are known as full nodes i.e., A node is …

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 …

Deepest node in a binary tree

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

JWT token as HttpOnly cookie in Django

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

HttpOnly cookie in Django

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

Size of a binary tree

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

Search a node in Binary tree

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

Left rotation of an array

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

Maximum in Binary tree

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

Second largest element in an array

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

Reverse level order traversal

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

Binary tree traversals

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

Introduction to Binary Tree

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

Introduction to Trees

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

Pair with given sum in an array

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

Data fetching in Next.js

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

Doubly Linked List

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

Linked List

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

Introduction to Linked list

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

Maximum area histogram

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