摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2017-04-01 17:16 一片叶子啊 阅读(97) 评论(0) 推荐(0) 编辑
摘要: You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/ve 阅读全文
posted @ 2017-04-01 16:54 一片叶子啊 阅读(134) 评论(0) 推荐(0) 编辑
摘要: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2017-04-01 16:23 一片叶子啊 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 分析: 阅读全文
posted @ 2017-04-01 15:49 一片叶子啊 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe 阅读全文
posted @ 2017-04-01 00:00 一片叶子啊 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 直接代码贴出来吧。 animation中之所以设置两个两个之间margin-left相等是为了实现“停顿”效果,看上去自然一些。 阅读全文
posted @ 2017-03-31 17:03 一片叶子啊 阅读(897) 评论(0) 推荐(0) 编辑
摘要: Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp 阅读全文
posted @ 2017-03-30 22:19 一片叶子啊 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: Example 1: Exa 阅读全文
posted @ 2017-03-30 10:47 一片叶子啊 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.Credits:Special thanks to  阅读全文
posted @ 2017-03-30 01:19 一片叶子啊 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 学习计算机组成原理的时候学过这个,结果今天看了一道LeetCode的习题,发现自己补码怎么算的都给忘了,罪过罪过,于是乎就搜了相关资料回忆了下,以下这篇文章写得很好,想记录下来方便以后查看。 http://www.cnblogs.com/zhangziqiu/archive/2011/03/30/C 阅读全文
posted @ 2017-03-30 00:40 一片叶子啊 阅读(138) 评论(0) 推荐(0) 编辑