摘要:
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100"思路:时间复杂度O(n), 空间复杂度O(1) 1 class Solution { 2 pub... 阅读全文
posted @ 2014-11-04 22:06
vincently
阅读(109)
评论(0)
推荐(0)
摘要:
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2014-11-04 16:53
vincently
阅读(236)
评论(0)
推荐(0)
摘要:
Given a string, determine if it is a palindrome, considering only alphanumericcharacters and ignoring cases.For example,"A man, a plan, a canal: Panam... 阅读全文
posted @ 2014-11-04 14:53
vincently
阅读(155)
评论(0)
推荐(0)
摘要:
Given a singlylinked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For examp... 阅读全文
posted @ 2014-11-04 13:17
vincently
阅读(159)
评论(0)
推荐(0)
摘要:
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?思路:... 阅读全文
posted @ 2014-11-04 09:57
vincently
阅读(185)
评论(0)
推荐(0)
浙公网安备 33010602011771号