类别归档：LeetCode

LeetCode OJ is a platform for preparing technical coding interviews.

题目描述：

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 and why?

Suppose a sorted array is rotated at ...

[Leetcode]Max Points on a Line 作者是 在线疯狂 发布于 2014年10月16日 在 LeetCode, Python.

题目描述

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.

[Leetcode]Evaluate Reverse Polish Notation 作者是 在线疯狂 发布于 2014年10月16日 在 LeetCode, Python.

题目描述

Evaluate the value of an arithmetic expression in Reverse Polish Notation.

Valid operators are +, -, *, /. Each operand may be an integer or another expression.

Some examples:
["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ...

[Leetcode]Reverse Words in a String 作者是 在线疯狂 发布于 2014年10月16日 在 LeetCode, Python.

题目描述

Given an input string, reverse the string word by word.

For example,
Given s = "the sky is blue",
return "blue is sky the".

Clarification:

What constitutes a word?
A sequence of non-space characters constitutes a word.

Could the input ...

题目描述：

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 ...