02 2018 档案

摘要:On an infinite number line (x-axis), we drop given squares in the order they are given. The i-th square dropped (positions[i] = (left, side_length)) i 阅读全文
posted @ 2018-02-28 23:50 Grandyang 阅读(4770) 评论(0) 推荐(0) 编辑
摘要:We are stacking blocks to form a pyramid. Each block has a color which is a one letter string, like `'Z'`. For every block of color `C` we place not i 阅读全文
posted @ 2018-02-26 23:19 Grandyang 阅读(5299) 评论(0) 推荐(1) 编辑
摘要:We are given N different types of stickers. Each sticker has a lowercase English word on it. You would like to spell out the given target string by cu 阅读全文
posted @ 2018-02-24 23:58 Grandyang 阅读(5812) 评论(1) 推荐(0) 编辑
摘要:We are given an elevation map, heights[i] representing the height of the terrain at that index. The width at each index is 1. After V units of water f 阅读全文
posted @ 2018-02-22 23:36 Grandyang 阅读(7329) 评论(2) 推荐(0) 编辑
摘要:You are standing at position 0 on an infinite number line. There is a goal at position target. On each move, you can either go left or right. During t 阅读全文
posted @ 2018-02-20 23:44 Grandyang 阅读(6580) 评论(11) 推荐(0) 编辑
摘要:In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. Each subarray will be of size k, and we want to max 阅读全文
posted @ 2018-02-18 23:50 Grandyang 阅读(9071) 评论(6) 推荐(2) 编辑
摘要:There is a box protected by a password. The password is n digits, where each letter can be one of the first k digits 0, 1, ..., k-1. You can keep inpu 阅读全文
posted @ 2018-02-17 23:54 Grandyang 阅读(8205) 评论(11) 推荐(0) 编辑
摘要:You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rota 阅读全文
posted @ 2018-02-15 05:45 Grandyang 阅读(8252) 评论(4) 推荐(2) 编辑
摘要:In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants of this n 阅读全文
posted @ 2018-02-12 22:29 Grandyang 阅读(9839) 评论(10) 推荐(0) 编辑
摘要:Given a start IP address ip and a number of ips we need to cover n, return a representation of the range as a list (of smallest possible length) of CI 阅读全文
posted @ 2018-02-10 23:50 Grandyang 阅读(13992) 评论(0) 推荐(0) 编辑
摘要:Given a grid where each entry is only 0 or 1, find the number of corner rectangles. A corner rectangle is 4 distinct 1s on the grid that form an axis- 阅读全文
posted @ 2018-02-08 23:34 Grandyang 阅读(8207) 评论(3) 推荐(1) 编辑
摘要:A virus is spreading rapidly, and your task is to quarantine the infected area by installing walls. The world is modeled as a 2-D array of cells, wher 阅读全文
posted @ 2018-02-06 23:49 Grandyang 阅读(3543) 评论(0) 推荐(0) 编辑
摘要:You have N bulbs in a row numbered from 1 to N. Initially, all the bulbs are turned off. We turn on exactly one bulb everyday until all bulbs are on a 阅读全文
posted @ 2018-02-05 02:47 Grandyang 阅读(8622) 评论(3) 推荐(0) 编辑
摘要:Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete th 阅读全文
posted @ 2018-02-02 23:29 Grandyang 阅读(3528) 评论(0) 推荐(0) 编辑

Fork me on GitHub