上一页 1 2 3 4 5 6 7 8 9 10 ··· 40 下一页
摘要: Shuffle a set of numbers without duplicates. Example: 阅读全文
posted @ 2017-02-28 20:01 amazingzoe 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文
posted @ 2017-02-28 18:05 amazingzoe 阅读(324) 评论(0) 推荐(0) 编辑
摘要: Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char matrix representing the game board. 'M' represents an unrevealed min 阅读全文
posted @ 2017-02-28 17:38 amazingzoe 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Design a Tic-tac-toe game that is played between two players on a n x n grid. You may assume the following rules: Example: Follow up:Could you do bett 阅读全文
posted @ 2017-02-24 21:29 amazingzoe 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example:Given n = 2, return 91. (The answer should be the 阅读全文
posted @ 2017-02-24 21:17 amazingzoe 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. Example: Note: 阅读全文
posted @ 2017-02-24 20:01 amazingzoe 阅读(204) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai 阅读全文
posted @ 2017-02-24 19:29 amazingzoe 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The 阅读全文
posted @ 2017-02-24 19:09 amazingzoe 阅读(155) 评论(0) 推荐(0) 编辑
摘要: A magical string S consists of only '1' and '2' and obeys the following rules: The string S is magical because concatenating the number of contiguous 阅读全文
posted @ 2017-02-24 18:19 amazingzoe 阅读(239) 评论(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:Wha 阅读全文
posted @ 2017-02-19 19:34 amazingzoe 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 40 下一页