原创 LeetCode-通配符模式串匹配

題目: '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The mat

原创 Leetcode-413. Arithmetic Slices

A sequence of number is called arithmetic if it consists of at least three elements and if the difference between an

原创 leetcode-357. Count Numbers with Unique Digits

Given a non-negative integer n, count all numbers with unique digits, x, w

原创 leetcode-377. Combination Sum IV

Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add

原创 eBay校園招聘編程題-淘氣的小明

題目: 代碼: #include <stdlib.h> #include <stdio.h> #include <algorithm> #include<iostream> #include<hash_set> #include<ha

原创 開心的小明-動態規劃算法

開心的小明 時間限制:1000 ms  |  內存限制:65535 KB 難度:4 描述小明今天很開心,家裏購置的新房就要領鑰匙了,新房裏有一間他自己專用的很寬敞的房間。更讓他高興的是,媽媽昨天對他說:“你的房間需要購買哪

原创 Leetcode-95.Unique Binary Search Trees II(a representative recursion problem)

題目: Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1...n. For ex

原创 464. Can I Win(something needed to be solved!)

寫博客之前還是貼一下廣州的天氣: 生活在廣州的同學們傻傻分不清楚是冬天還是夏天。。。。。。 下面我們進入正題: 題目: In the "100 game," two players take turns adding, to a r

原创 Leetcode-139. Word Break

題目: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be

原创 Leetcode-53. Maximum Subarray

題目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For exa

原创 Leetcode-62. Unique Paths and 63. Unique Paths II

Leetcode-62. Unique Paths 題目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagra

原创 Leetcode-96.Unique Binary Search Trees

題目: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n 

原创 Leetcode-403.Frog Jump(青蛙跳石頭)

今天的題目是:Leetcode 403-青蛙跳 A frog is crossing a river. The river is divided into x units and at each unit there may or m

原创 Leetcode-70. Climbing Stairs

好久沒有刷題了,感覺手都生了。今天來道簡單點的題目——爬樓梯; 題目如下: You are climbing a stair case. It takes n steps to reach to the top. Each time

原创 Leetcode-32. Longest Valid Parentheses

題目: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed