Given a binary tree, print it vertically. The following example illustrates vertical order traversal.
Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum.
Given an array containing only 0s and 1s, find the largest subarray which contain equal no of 0s and 1s. Expected time complexity is O(n).
Given a Binary Tree, find vertical sum of the nodes that are in same vertical line. Print all sums through different vertical lines.
Given two arrays: arr1[0..m-1] and arr2[0..n-1]. Find whether arr2 is a subset of arr1 or not. Both the arrays are not in sorted order. It may be assumed that elements in both array are distinct.
Write a C program that, given an array A of n numbers and another number x, determines whether or not there exist two elements in S whose sum is exactly x.
Write an efficient C function to return maximum occurring character in the input string e.g., if input string is “test” then function should return ‘t’. We strongly recommend that you click here and practice it, before moving on to the solution. Algorithm: One obvious approach to solve this problem would be to sort the input… Read More »