摘要:
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below a... 阅读全文
摘要:
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.每次对比最高位和最低位bool isPalindrome(int x) { if(x = 10) base = ... 阅读全文
摘要:
Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removi... 阅读全文
摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the c... 阅读全文
摘要:
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for... 阅读全文
摘要:
mplement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.int strStr(char *haystack, ... 阅读全文