@@ -0,0 +1,694 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# @Author: Zeyuan Shang%0A# @Date:   2015-11-04 00:19:51%0A# @Last Modified by:   Zeyuan Shang%0A# @Last Modified time: 2015-11-04 00:20:00%0Aclass Solution(object):%0A    def lengthOfLIS(self, nums):%0A        %22%22%22%0A        :type nums: List%5Bint%5D%0A        :rtype: int%0A        %22%22%22%0A        dp = %5B%5D%0A        for num in nums:%0A            l, r = 0, len(dp) - 1%0A            while l %3C= r:%0A                mid = (l + r) / 2%0A                if dp%5Bmid%5D %3C num:%0A                    l = mid + 1%0A                else:%0A                    r = mid - 1%0A            if l == len(dp):%0A                dp.append(num)%0A            else:%0A                dp%5Bl%5D = num%0A        return len(dp)

add longest-increasing-subsequence