摘要:
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(nums); // Shuffle the array [1,2,3] and return its r... 阅读全文
posted @ 2018-01-23 21:52
xiejunzhao
阅读(172)
评论(0)
推荐(0)
摘要:
Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being chosen.Follow up: What if the linked list is extremely large and its le... 阅读全文
posted @ 2018-01-23 21:51
xiejunzhao
阅读(123)
评论(0)
推荐(0)
摘要:
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ "((()))", "(()())", "(())()", "()(())",... 阅读全文
posted @ 2018-01-23 21:50
xiejunzhao
阅读(159)
评论(0)
推荐(0)

浙公网安备 33010602011771号