Ying

个人博客:http://smartsi.club/

[LeetCode]154.Find Minimum in Rotated Sorted Array II

【题目】 Follow up for "Find Minimum in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How...

2015-01-31 20:46:29

阅读数:1356

评论数:0

[LeetCode]154.Find Minimum in Rotated Sorted Array II

【题目】 Follow upfor "Find Minimum in Rotated Sorted Array": What ifduplicatesare allowed? Would this affect the run-time compl...

2015-01-31 20:46:00

阅读数:6

评论数:0

[LeetCode]154.Find Minimum in Rotated Sorted Array II

【题目】 Follow upfor "Find Minimum in Rotated Sorted Array": What ifduplicatesare allowed? Would this affect the run-time compl...

2015-01-31 20:46:00

阅读数:5

评论数:0

[LeetCode]153.Find Minimum in Rotated Sorted Array

【题目】 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). Find the minim...

2015-01-31 17:21:26

阅读数:1801

评论数:0

[LeetCode]153.Find Minimum in Rotated Sorted Array

【题目】 Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2). Find the ...

2015-01-31 17:21:00

阅读数:10

评论数:0

[LeetCode]153.Find Minimum in Rotated Sorted Array

【题目】 Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2). Find the ...

2015-01-31 17:21:00

阅读数:15

评论数:0

[LeetCode]171.Excel Sheet Column Number

【题目】 Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. ...

2015-01-30 17:10:01

阅读数:1371

评论数:0

[LeetCode]171.Excel Sheet Column Number

【题目】 Related to questionExcel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. ...

2015-01-30 17:10:00

阅读数:5

评论数:0

[LeetCode]171.Excel Sheet Column Number

【题目】 Related to questionExcel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. ...

2015-01-30 17:10:00

阅读数:4

评论数:0

[LeetCode]169.Majority Element

【题目】 Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assum...

2015-01-30 15:48:51

阅读数:1633

评论数:0

[LeetCode]169.Majority Element

【题目】 Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times. You may as...

2015-01-30 15:48:00

阅读数:3

评论数:0

[LeetCode]169.Majority Element

【题目】 Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times. You may as...

2015-01-30 15:48:00

阅读数:2

评论数:0

[经典面试题][百度]在由N个正整数的集合S中,找出最大元素C,满足C=A + B

【题目】 在由N个正整数的集合S中,找出最大元素C,满足C=A + B 其中A,B都是集合S中元素,请给出算法描述,代码与时间复杂度分析。 【分析】 1,对集合S进行排序(快排),从小到大排序 2,让C指向集合最后一个元素(最大元素) 3,让i指向S中第一个元素,让j指向C的前一个元素 4,如果...

2015-01-30 14:12:05

阅读数:2581

评论数:1

[经典面试题][百度]在由N个正整数的集合S中,找出最大元素C,满足C=A + B

【题目】 在由N个正整数的集合S中,找出最大元素C,满足C=A + B其中A,B都是集合S中元素,请给出算法描述,代码与时间复杂度分析。 【分析】 1,对集合S进行排序(快排),从小到大排序2,让C指向集合最后一个元素(最大元素)3,让i指向S中第一个元素,让j指向C的前一个元素4,如果,...

2015-01-30 14:12:00

阅读数:4

评论数:0

[经典面试题][百度]在由N个正整数的集合S中,找出最大元素C,满足C=A + B

【题目】 在由N个正整数的集合S中,找出最大元素C,满足C=A + B其中A,B都是集合S中元素,请给出算法描述,代码与时间复杂度分析。 【分析】 1,对集合S进行排序(快排),从小到大排序2,让C指向集合最后一个元素(最大元素)3,让i指向S中第一个元素,让j指向C的前一个元素4,如果,...

2015-01-30 14:12:00

阅读数:4

评论数:0

[LeetCode]79.Word Search

【题目】 Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, whe...

2015-01-30 12:27:43

阅读数:1884

评论数:0

[LeetCode]79.Word Search

【题目】 Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell...

2015-01-30 12:27:00

阅读数:4

评论数:0

[LeetCode]79.Word Search

【题目】 Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell...

2015-01-30 12:27:00

阅读数:5

评论数:0

[经典面试题]排序数组中绝对值最小元素

【题目】 题目为: 有一个已经排序的数组(升序),数组中可能有正数、负数或0,求数组中元素的绝对值最小的数,要求,不能用顺序比较的方法(复杂度需要小于O(n)),可以使用任何语言实现 例如,数组{-20,-13,-4, 6, 77,200} ,绝对值最...

2015-01-29 20:06:35

阅读数:2629

评论数:1

[经典面试题]排序数组中绝对值最小元素

【题目】 题目为: 有一个已经排序的数组(升序),数组中可能有正数、负数或0,求数组中元素的绝对值最小的数,要求,不能用顺序比较的方法(复杂度需要小于O(n)),可以使用任何语言实现 例如,数组{-20,-13,-4, 6, 77,200} ,绝对值最小的是-...

2015-01-29 20:06:00

阅读数:9

评论数:0

提示
确定要删除当前文章?
取消 删除