12 2014 档案
摘要:题目描述: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 be...
阅读全文
摘要:题目摘要:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321 这道题不算难,主要是要考虑"反转后的值可能越界"这一种情况。(此题起初设计时,未考虑这种情况,因此网上很多旧...
阅读全文
摘要:题目描述:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed ...
阅读全文
摘要:题目描述:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique l...
阅读全文
摘要:使用递归可以非常方便地实现二叉树的遍历。如果不使用递归呢,请听我一一道来。首先给出二叉树遍历的递归版本:struct BTNode { char data; BTNode *lchild, *rchild;};void visit(BTNode *p){ coutdatalch...
阅读全文
摘要:题目描述:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a si...
阅读全文
摘要:题目描述:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette...
阅读全文
摘要:题目描述: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sho...
阅读全文

浙公网安备 33010602011771号