随机数
sscssz
这个作者很懒,什么都没留下…
展开
-
【leetcode】384. Shuffle an Array【M】
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原创 2016-08-28 18:29:17 · 660 阅读 · 0 评论 -
【leetcode】382. Linked List Random Node【M】【74】
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 i原创 2016-11-04 21:41:09 · 407 阅读 · 0 评论