Showing posts with label implementation. Show all posts
Showing posts with label implementation. Show all posts
Saturday, November 24, 2018
[Game]Snake
Labels:
game,
implementation
Location:
Newark, CA 94560, USA
Wednesday, November 14, 2018
Wednesday, October 31, 2018
Sunday, September 9, 2018
Thursday, August 16, 2018
Sunday, May 13, 2018
Sunday, April 8, 2018
Sunday, February 22, 2015
[LeetCode]LRU Cache
Labels:
implementation,
leetcode
Location:
Irvine, CA, USA
Wednesday, January 7, 2015
[LeetCode]String to Integer(atoi)
主要麻烦的地方在于注意各种corner case,按照题目要求来就好。主要讲一下,判断overflow, 之前我用的是很蠢的判断溢出的方法,以正数为例,之前是Integer.MAX_VALUE减去十次原来的数,在减去新的一位看是不是大于0。刷第三次的时候觉得这个方法太过于愚蠢了,稍微想了下,只需要Integer.MAX_VALUE减去新的那一位再除以10,看是不是大于原来的数就可以了。
Labels:
implementation,
leetcode,
string
Location:
Irvine, CA, USA
Subscribe to:
Posts (Atom)