上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 43 下一页

2016年9月16日

33. Search in Rotated Sorted Array (Array;Divide-and-Conquer)

摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target va 阅读全文

posted @ 2016-09-16 21:10 joannae 阅读(172) 评论(0) 推荐(0) 编辑

2016年8月26日

归并排序求逆序数

摘要: 思路:假设前半部分(A[left]到A[mid])与后半部分(A[mid+1]到A[right])都是从小到大排好序的,那么如果A[left]>A[mid+1],则A[mid+1]与前半部分的逆序数目是mid-left+1 阅读全文

posted @ 2016-08-26 06:57 joannae 阅读(203) 评论(0) 推荐(0) 编辑

2016年5月30日

9. Palindrome Number

摘要: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) 阅读全文

posted @ 2016-05-30 09:28 joannae 阅读(141) 评论(0) 推荐(0) 编辑

2016年5月19日

8. String to Integer (atoi)

摘要: mplement 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 阅读全文

posted @ 2016-05-19 20:08 joannae 阅读(181) 评论(0) 推荐(0) 编辑

2016年5月12日

7. Reverse Integer

摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Have you thought about this? Here are some good questions t 阅读全文

posted @ 2016-05-12 06:28 joannae 阅读(192) 评论(0) 推荐(0) 编辑

2016年5月11日

6. ZigZag Conversion

摘要: 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 font 阅读全文

posted @ 2016-05-11 19:50 joannae 阅读(219) 评论(0) 推荐(0) 编辑

2016年5月10日

5. Longest Palindromic Substring

摘要: 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 longes 阅读全文

posted @ 2016-05-10 11:07 joannae 阅读(187) 评论(0) 推荐(0) 编辑

2016年5月5日

4. Median of Two Sorted Arrays

摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文

posted @ 2016-05-05 19:31 joannae 阅读(136) 评论(0) 推荐(0) 编辑

2016年5月2日

3. Longest Substring Without Repeating Characters

摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文

posted @ 2016-05-02 20:07 joannae 阅读(161) 评论(0) 推荐(0) 编辑

2016年5月1日

2. Add Two Numbers

摘要: 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 single 阅读全文

posted @ 2016-05-01 21:20 joannae 阅读(152) 评论(0) 推荐(0) 编辑

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 43 下一页

导航