上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页
摘要: Design a class which receives a list of words in the constructor, and implements a method that takes two words word1 and word2 and return the shortest 阅读全文
posted @ 2020-01-14 11:09 xuan_abc 阅读(123) 评论(0) 推荐(0)
摘要: Given a binary tree struct Node { int val; Node *left; Node *right; Node *next; } Populate each next pointer to point to its next right node. If there 阅读全文
posted @ 2020-01-13 00:27 xuan_abc 阅读(124) 评论(0) 推荐(0)
摘要: Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every ele 阅读全文
posted @ 2020-01-12 11:26 xuan_abc 阅读(164) 评论(0) 推荐(0)
摘要: Given an array A of integers and integer K, return the maximum S such that there exists i < j with A[i] + A[j] = S and S < K. If no i, j exist satisfy 阅读全文
posted @ 2020-01-12 10:33 xuan_abc 阅读(175) 评论(0) 推荐(0)
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Example 1: Input: [[1,1],[2,2],[3,3]] Output: 3 Ex 阅读全文
posted @ 2020-01-12 07:50 xuan_abc 阅读(149) 评论(0) 推荐(0)
摘要: Shuffle a set of numbers without duplicates. Example: // Init an array with set 1, 2, and 3. int[] nums = {1,2,3}; Solution solution = new Solution(nu 阅读全文
posted @ 2020-01-12 03:59 xuan_abc 阅读(98) 评论(0) 推荐(0)
摘要: Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number m 阅读全文
posted @ 2020-01-12 03:38 xuan_abc 阅读(171) 评论(0) 推荐(0)
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, 阅读全文
posted @ 2020-01-09 13:16 xuan_abc 阅读(119) 评论(0) 推荐(0)
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, 阅读全文
posted @ 2020-01-09 12:23 xuan_abc 阅读(133) 评论(0) 推荐(0)
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d 阅读全文
posted @ 2020-01-09 11:43 xuan_abc 阅读(119) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页