Posts by Prabhnoor Singh
Author Biographical Info: Not available
Update every node of a binary tree such that it stores the sum of all nodes in its left subtree including its own in C++. What is a Binary Tree? A non- linear data structure in whi.... Read More
For a non-negative number x, print Yes if the binary representation of x is a palindrome else print No in C++. The binary representation of a number with leading 0’s will not.... Read More
For a sorted set and a key, print the lower bound and the upper bound of the key K in the set in C++ or print -1 if the element is not present or out of bounds. First, we need to .... Read More
In this tutorial, we will learn about stack unwinding in C++. Stack Unwinding is the removal of the function call stack items at runtime. In C++, the function call stack is searche.... Read More
In this article, we will learn about the has_virtual_destructor in C++ with examples. This function of C++ STL tells us if any template type T has a virtual destructor or not. Head.... Read More
For every element in the array, print the next smaller of the next greater element. Also print -1 for elements who do not either the next greater or next smaller of the next greate.... Read More
There are many cases in which our iterator gets invalidated while we iterate any container. This can be due to many reasons including the change in size or shape of the container w.... Read More
In this article, we will be learning about the static const member variable in C++ which is a combination of const which is a type qualifier and static which is a storage specifier.... Read More