C++ Program to Modify given array to a non-decreasing array by rotation
Given an array arr[] of size N (consisting of duplicates), the task is to check if the given array can be converted to a non-decreasing array by rotating it. If it’s not possible to do so, then print “No“. Otherwise, print “Yes“....
read more
C++ Program For Merging Two Sorted Linked Lists Such That Merged List Is In Reverse Order
Given two linked lists sorted in increasing order. Merge them such a way that the result list is in decreasing order (reverse order)....
read more
std::is_trivially_assignable in C++ with Examples
The std::is_trivially_assignable template of C++ STL is present in the <type_traits> header file. The std::is_trivally_assignable template of C++ STL is used to check whether a value of type B can be assigned to type A or not. It returns the boolean value either true or false....
read more
std::is_nothrow_assignable in C++ with Examples
The std::is_nothrow_assignable template of C++ STL is present in the <type_traits> header file. The std::is_nothrow_assignable template of C++ STL is used to check whether A is type assignable to B or not and this is known for not to throw any exception. It return the boolean value true if A is type assignable to B, Otherwise return false....
read more
ios manipulators noshowbase() function in C++
The noshowbase() method of stream manipulators in C++ is used to clear the showbase format flag for the specified str stream. This flag displays the integers in decimal only. Syntax:...
read more
acosh() function for complex number in C++
The acosh() function for complex number is defined in the complex header file. This function is the complex version of the acosh() function. This function is used to calculate the complex arc hyperbolic cosine of complex number z and returns the arc hyperbolic cosine of complex number z....
read more
iswblank() function in C/C++
The iswblank() is a built-in function in C/C++ which checks if the given wide character is a blank character or not. It is defined within the cwctype header file of C++. Syntax:...
read more
unordered_multiset max_bucket_count() function in C++ STL
The unordered_multiset::max_bucket_count() is a built-in function in C++ STL which returns the maximum number of buckets that the unordered multiset container can have. This is the maximum it can have, it cannot exceed despite the collisions due to certain limitations on it....
read more
Persistent Trie | Set 1 (Introduction)
Prerequisite:...
read more
unordered_map reserve() in C++ STL
As we know a Bucket is a slot in the container’s internal hash table to which all the element are assigned based on the hash value of their key...
read more
Preorder, Postorder and Inorder Traversal of a Binary Tree using a single Stack
Given a binary tree, the task is to print all the nodes of the binary tree in Pre-order, Post-order, and In-order iteratively using only one stack traversal....
read more
K-th ancestor of a node in Binary Tree
Given a binary tree in which nodes are numbered from 1 to n. Given a node and a positive integer K. We have to print the K-th ancestor of the given node in the binary tree. If there does not exist any such ancestor then print -1.For example in the below given binary tree, 2nd ancestor of node 4 and 5 is 1. 3rd ancestor of node 4 will be -1....
read more