摘要: 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 阅读(156) 评论(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 阅读(150) 评论(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 阅读(213) 评论(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 阅读(163) 评论(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 阅读(163) 评论(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 阅读(256) 评论(0) 推荐(0)