摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2018-10-17 13:07 一丝清风一抹红尘 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2018-10-17 12:22 一丝清风一抹红尘 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Foll 阅读全文
posted @ 2018-10-16 17:34 一丝清风一抹红尘 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other wo 阅读全文
posted @ 2018-10-14 10:11 一丝清风一抹红尘 阅读(121) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2018-10-12 16:42 一丝清风一抹红尘 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers 阅读全文
posted @ 2018-10-12 16:00 一丝清风一抹红尘 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: 阅读全文
posted @ 2018-10-12 15:39 一丝清风一抹红尘 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Given two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character. Example 1: Input: S = 阅读全文
posted @ 2018-10-12 14:32 一丝清风一抹红尘 阅读(330) 评论(0) 推荐(0) 编辑
摘要: A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bottom-left corner, and (x2, y2) are the coordinates 阅读全文
posted @ 2018-10-12 12:25 一丝清风一抹红尘 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2018-10-11 19:21 一丝清风一抹红尘 阅读(94) 评论(0) 推荐(0) 编辑