摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]&qu 阅读全文
posted @ 2013-06-05 09:55
冰点猎手
阅读(135)
评论(0)
推荐(0)
摘要:
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.For example, given n = 2, return [0,1,3,2]. Its gray c 阅读全文
posted @ 2013-06-05 00:05
冰点猎手
阅读(151)
评论(0)
推荐(0)