LeetCode 20 Valid Parentheses

         * Given a string s containing just the characters '(', ')', '{', '}', '[', ']', determine if the input string is valid.
         * An input string is valid if:
         * 1. Open brackets must be closed by the same type of brackets.
         * 2. Open brackets must be closed in the correct order.

...繼續閱讀 »

LeetCode 15 3Sum

Given an array nums of n integers, are there elements a,b,c in nums such that a+b+c = 0? 
Find all unique triplets in the array which gives the sum of zero.

Note : 過不了 TimeLimit 還需要修改

...繼續閱讀 »