Remove all white spaces from a string

Given a string that may have white spaces, write code to remove all white spaces from than string. For example: Input String: "IT IS HOT […]

Maximum (or minimum) sum of subarray of size k

Given an array of n integers, find the sub-array of length k with maximum sum. For example, Input Array: {6, 4, 3, 5, 1, 9, […]

Consecutive numbers with sum equal to n

Given a positive integer n, print the consecutive numbers whose sum is equal to n. For example, n = 20 Output: 2, 3, 4, 5, […]