LeetCode day11

28. Length of Last Word

' ' = char white space,   " " = string

需要考虑各种情况   ‘a ’,      ' ',        '   a' 

 29. Search Rotated Sorted Array

需要考虑各种情况

30. Search Rotated Sorted Array II

A[mid] = A[high] && A[mid] = A[low], 无法判断哪边有序。

需要 O(n)

31. Valid Parentheses

Stack<Character> st = new Stack<Character>();

st.empty(),  st.push(char x),  st.pop()

 

posted on 2014-10-30 05:10  SuperBo  阅读(104)  评论(0编辑  收藏  举报