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.
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.
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.
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.
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.