## Convert Sorted Array to Binary Search Tree in C++ – LeetCode Solution [Easy]

Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree.

## Array Rotation

Array rotation is a problem of changing the order of the elements of the array. Decreasing the index of the element by one and changing the index of the first element to n-1.

## Find number of subarrays with given sum (with Negative numbers) – LeetCode Solution [Medium]

In the previous post, we discussed about finding the total number of continuous subarrays of a given array (of non-negative numbers) whose sum equals to k. In this post we’ll include negative numbers in the given array arr.

## Find number of subarrays with given sum (Non-negative numbers) [Sliding window]

Given an array of non-negative integers arr and an integer k, return the total number of continuous subarrays whose sum equals to k.

## Find maximum sum of contiguous subarray of size k [Sliding Window]

You’re given an array of size N. You’ve to find the maximum sum obtained from a contiguous subarray of size k of the given array, where k <= N.

## Subset with a given sum and number of subsets

You are given an array of non-negative integers, you have to find the number of subsets having sum equal to the given sum. Subset needs not to be contiguous.

## Longest Increasing Subsequence Solution (LIS) – LeetCode Solution [Medium]

Given an integer array arr, return the length of the longest strictly increasing subsequence. Strictly increasing sequence is a sequence such that all elements of the sequence are sorted in increasing order.

## Find the Maximum Subarray and its Sum [Kadane’s Algorithm]

Find the maximum subarray and its sum is a problem of finding contiguous subarray with largest sum in an array of integers.

## How to find all pairs of integers in an array that have the same product?

The goal is to find all the pairs from the given vector arr which have the product p. We could solve this problem in O(n).

## Arrays

An array is a finite collection of similar elements stored in adjacent memory locations. The simplest form of array is a one-dimensional array that can be defined as a finite ordered set of similar type of data.