SGSrajan Guptainasquero.hashnode.dev·Dec 9, 2019Find the Diameter of a Binary TreeYou are given the reference to the root node of a binary tree. Find the diameter of the tree. Input: The function diameterOfBinaryTree(struct node *root) only takes the reference to the root node as input. Output: Return the diameter of the Binary Tr...00
SGSrajan Guptainasquero.hashnode.dev·Dec 8, 2019Find a subarray with a given sumGiven an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S. Input: The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case...00