Given an array of integers, find a sub-array having given sum in it.
Given an array of integers, find the maximum difference between two elements in the array such that smaller element appears before the larger element.
Given a limited range array of size n where array contains elements between 1 to n-1 with one element repeating, find the duplicate number in it.
Given a string and a dictionary of words, determine if string can be segmented into a space-separated sequence of one or more dictionary words.
Given a string, inplace remove all occurrences of “AB” and “C” from it.
Given a square matrix, rotate matrix by 90 degrees in clock-wise direction. The transformation should be done in-place and in quadratic time.