## Sort even number in ascending order and odd number in descending order C++

Given: An array of integers containing even and odd numbers. Problem: For the given array sort even number in ascending order and then sort all the odd numbers in descending order. Then arrange odd numbers first and then arrange the even numbers. Examples: Input : arr[] = {1, 2, 3, 5, 4, 7, 10} Output : … Read more

## Check if it is possible to make array increasing or decreasing by rotating it

In this post we will write a C++ program to check if it is possible to make an array increasing or decreasing by rotating the array. Given: An array arr[] of N distinct elements. Problem: To check if it is possible to make it increasing or decreasing by rotating the array in any direction. Examples: Input: … Read more

## Program to check if Tree is Binary Search Tree C++

Hello all, today we will write a program to check if given Binary Tree is Binary Search Tree C++ or not. So let’s start with what properties a tree must satisfy so that it is a Binary Search Tree. How to identify a Binary Search Tree: The tree satisfies the binary search tree property, which … Read more