01 2016 档案

摘要:火柴拼出多少个正方形 http://matchstickpuzzles.blogspot.com/2011/06/55-4x4-square-how-many-squares.html 输入是两个二维数组ver 和 hor, 若是有火柴就是1, 没有就是0. dpHor 表示横方向上有多少连续火柴, 阅读全文
posted @ 2016-01-31 23:39 Dylan_Java_NYC 阅读(385) 评论(0) 推荐(0) 编辑
摘要:常用iterate 方法 阅读全文
posted @ 2016-01-27 23:15 Dylan_Java_NYC 阅读(326) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/bulb-switcher/ 题目: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off 阅读全文
posted @ 2016-01-23 16:38 Dylan_Java_NYC 阅读(293) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/maximum-product-of-word-lengths/用mark[i]数组来标记 words[i]都含有哪些字母,假若有个'c', 就在第三位上有个1.通过mark[i] & mark[j] 是否为0来确定是否有相... 阅读全文
posted @ 2016-01-22 12:08 Dylan_Java_NYC 阅读(284) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/rotate-array/ 题目: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the 阅读全文
posted @ 2016-01-21 16:53 Dylan_Java_NYC 阅读(228) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/summary-ranges/ 题目: Given a sorted integer array without duplicates, return the summary of its ranges. Example 1 阅读全文
posted @ 2016-01-18 17:24 Dylan_Java_NYC 阅读(258) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/string-to-integer-atoi/ 题目: Implement atoi which converts a string to an integer. The function first discards as 阅读全文
posted @ 2016-01-18 16:33 Dylan_Java_NYC 阅读(269) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/reverse-integer/ 题目: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 阅读全文
posted @ 2016-01-18 15:48 Dylan_Java_NYC 阅读(146) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/range-sum-query-mutable/ 题目: Given an integer array nums, find the sum of the elements between indices i and j ( 阅读全文
posted @ 2016-01-18 14:40 Dylan_Java_NYC 阅读(368) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:http://www.lintcode.com/en/problem/a-b-problem/不让用 数学运算符,就用位运算符。a的对应位 ^ b的对应位 ^ carry 就是res中的对应位。carry 更新为0还是1要分别讨论。Time Complexity: O(1), 一共3... 阅读全文
posted @ 2016-01-15 14:43 Dylan_Java_NYC 阅读(252) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/power-of-three/ 题目: Given an integer, write a function to determine if it is a power of three. Example 1: Exampl 阅读全文
posted @ 2016-01-08 22:32 Dylan_Java_NYC 阅读(297) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/pascals-triangle-ii/ 题目: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3 阅读全文
posted @ 2016-01-05 17:29 Dylan_Java_NYC 阅读(267) 评论(0) 推荐(0) 编辑
摘要:原题链接在这里:https://leetcode.com/problems/pascals-triangle/ 题目: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows 阅读全文
posted @ 2016-01-05 17:01 Dylan_Java_NYC 阅读(782) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示