http://www.practice.geeksforgeeks.org/problem-page.php?pid=166 Minimum sum partition Given an array, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums is minimum. Input: The first line contains an integer 'T' denoting the total number ...
http://www.practice.geeksforgeeks.org/problem-page.php?pid=91 Minimum Points To Reach Destination Given a grid with each cell consisting of positive, negative or no points i.e, zero points. We can move across a cell only if we have positive points ( > 0 ). Whenever we pass through a...
The minimum depth is the number of nodes along the shortest path from root node down to the nearest leaf node. Solution 1. Recursion 1publicclassMinDepthBt {2publicintgetMinDepth(TreeNode root) {3returnhelper(root, 0);4}5privateinthelper(TreeNode node,intdepth) {6if(node ==null) {7re...