LeetCode
一起来玩玩呗
just to fun...
展开
-
LeetCode 第一题剪彩自己的leetCode之路
Reverse Words in a String Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.原创 2014-08-18 16:01:18 · 1346 阅读 · 0 评论 -
LeetCode 2 Evaluate Reverse Polish Notation
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",原创 2014-08-18 16:42:31 · 779 阅读 · 0 评论 -
LeetCode Search in Rotated Sorted Array
Search in Rotated Sorted Array Total Accepted: 27955 Total Submissions: 97929My SubmissionsSuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6原创 2014-10-09 10:15:42 · 899 阅读 · 0 评论 -
LeetCode Remove Duplicates from Sorted Array
问题描述: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 another array, you must do this in place原创 2014-10-08 17:59:27 · 914 阅读 · 0 评论 -
LeetCode Remove Duplicates from Sorted Array II
title 描述 Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3], Your function should return length = 5, and A is no原创 2014-10-08 18:03:47 · 933 阅读 · 2 评论 -
LeetCode Search in Rotated Sorted Array II
Search in Rotated Sorted Array II Total Accepted: 18488 Total Submissions: 59914My SubmissionsFollow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this原创 2014-10-10 14:37:27 · 945 阅读 · 0 评论