## Find Numbers with Even Number of Digits Leetcode Solution

In this problem, we are given an array of positive integers. We need to find the count of numbers with an even number of digits. Example   Array = {123 , 34 , 3434 , 121 , 100} 2 Explanation: Only 34 and 3434 are integers with an even number of …

## Diagonal Traversal of Binary Tree

Problem Statement   The problem “Diagonal Traversal of Binary Tree” states that you are given a binary tree and now you need to find the diagonal view for the given tree. When we see a tree from the top-right direction. The nodes which are visible to us is the diagonal view …

## Pair with given product

The problem “Pair with given product” states that you are given an integer array and a number “x”. Determine, whether an array consists of a pair of which product equals ‘x’ exist in the given input array. Example   [2,30,12,5] x = 10 Yes, it has Product Pair Explanation Here 2 …

## Queries for GCD of all numbers of an array except elements in a given range

Problem Statement   The “Queries for GCD of all numbers of an array except elements in a given range” problem states that you will be given an integer array and a q number of queries. Each query contains the number left and right. The problem statement asks to find out the …

## Maximize sum of consecutive differences in a circular array

Problem Statement   Suppose you have an integer array. This array should be treated as a circular array. The last value of an array will be connected to the first array, an ⇒ a1. The problem “Maximize sum of consecutive differences in a circular array” asks to find out the maximum …

## Program for Bridge and Torch problem

Problem Statement   The “Bridge and Torch” problem states that you are given an array of time a person needs to cross the bridge. Since it is time, it comprises positive integers. Along with the time we are given a bridge, which a person needs to cross. The bridge allows only …

## Find all permuted rows of a given row in a matrix

Problem Statement   Find all permuted rows of a given row in a matrix states that you are given a matrix of size m*n and a matrix row number says ‘row’. The problem statement asks to find out all the possible rows which are permutation to the given row. This is …

## Maximum sum bitonic subarray

Problem Statement   An array having n integers is given to us. We need to find the maximum sum bitonic subarray. A bitonic subarray is nothing but just a subarray where the elements are arranged in a specific order. Such that the first elements are in increasing order and then in …

## Find Peak Element

Let’s understand Find Peak Element problem. Today we have with us an array that needs its peak element. Now, you must be wondering as to what do I mean by the peak element? The peak element is one which is greater than all its neighbours. Example: Given an array of …

## Serialize and Deserialize Binary Tree

We have given a binary tree containing N number of nodes where each node has some value. We need to serialize and deserialize the binary tree. Serialize The process of storing a tree in a file without disturbing its structure is called serialization. DeserializeSerialize and Deserialize Binary Tree The process …