上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 37 下一页
摘要: Given a set of distinct integers, return all possible subsets. Notice Elements in a subset must be in non-descending order. The solution set must not 阅读全文
posted @ 2017-08-08 13:26 Review->Improve 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Given a set of non negative integers and a target value, find if there exists a subset in the given set whose sum is target. Solution 1. Enumerate all 阅读全文
posted @ 2017-08-08 12:50 Review->Improve 阅读(485) 评论(0) 推荐(0) 编辑
摘要: Given an array, write a program to generate a random permuation of array elements. This question is also asked as "shuffle a deck of cards" or "random 阅读全文
posted @ 2017-08-08 02:48 Review->Improve 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum depth or height of this tree. Solution 1. In order traversal to count the maximum depth 1 import java.util.Linke 阅读全文
posted @ 2017-08-08 02:27 Review->Improve 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Given a BST whose keys are integers. Find the inorder successor and predecessor of a given key. In case the given key is not found in the BST, return 阅读全文
posted @ 2017-08-08 02:05 Review->Improve 阅读(390) 评论(0) 推荐(0) 编辑
摘要: Given some matrices, in what order you would multiply them to minimize cost of multiplication. The following problem formulation is extracted from thi 阅读全文
posted @ 2017-08-04 12:31 Review->Improve 阅读(477) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array. Write a program that creates a Balanced Binary Search Tree using array elements. If there are n elements in array, then floor(n/ 阅读全文
posted @ 2017-08-04 00:45 Review->Improve 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Given a Binary Tree, Print the corner nodes at each level. The node at the leftmost and the node at the rightmost. For example, output for following i 阅读全文
posted @ 2017-08-03 11:42 Review->Improve 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Given two strings, find the longest common su 阅读全文
posted @ 2017-08-02 14:02 Review->Improve 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a dictionary of words dict, determine if s can be break into a space-separated sequence of one or more dictionary words. Example 阅读全文
posted @ 2017-08-01 15:36 Review->Improve 阅读(327) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 37 下一页