04 2017 档案

摘要:Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects 阅读全文
posted @ 2017-04-30 08:47 Grandyang 阅读(4666) 评论(1) 推荐(2) 编辑
摘要:Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subt 阅读全文
posted @ 2017-04-29 23:49 Grandyang 阅读(5673) 评论(0) 推荐(0) 编辑
摘要:Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2017-04-27 23:57 Grandyang 阅读(9712) 评论(0) 推荐(0) 编辑
摘要:Think about Zuma Game. You have a row of balls on the table, colored red(R), yellow(Y), blue(B), green(G), and white(W). You also have several balls i 阅读全文
posted @ 2017-04-25 00:01 Grandyang 阅读(9244) 评论(2) 推荐(0) 编辑
摘要:Given a picture consisting of black and white pixels, and a positive integer N, find the number of black pixels located at some specific row R and col 阅读全文
posted @ 2017-04-24 02:26 Grandyang 阅读(6140) 评论(0) 推荐(0) 编辑
摘要:Given a picture consisting of black and white pixels, find the number of black lonely pixels. The picture is represented by a 2D char array consisting 阅读全文
posted @ 2017-04-23 22:43 Grandyang 阅读(5855) 评论(0) 推荐(0) 编辑
摘要:There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by rolling up (u), down (d), left (l) or right (r), but it 阅读全文
posted @ 2017-04-21 23:24 Grandyang 阅读(9961) 评论(0) 推荐(0) 编辑
摘要:You are given a string representing an attendance record for a student. The record only contains the following three characters: A student could be re 阅读全文
posted @ 2017-04-19 23:23 Grandyang 阅读(4746) 评论(0) 推荐(0) 编辑
摘要:There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by rolling up, down, left or right, but it won't stop roll 阅读全文
posted @ 2017-04-17 22:58 Grandyang 阅读(17469) 评论(24) 推荐(0) 编辑
摘要:Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and is gre 阅读全文
posted @ 2017-04-15 22:43 Grandyang 阅读(9591) 评论(1) 推荐(1) 编辑
摘要:Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. E 阅读全文
posted @ 2017-04-13 12:17 Grandyang 阅读(7062) 评论(0) 推荐(0) 编辑
摘要:There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. Yo 阅读全文
posted @ 2017-04-11 23:56 Grandyang 阅读(5760) 评论(8) 推荐(1) 编辑
摘要:There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct 阅读全文
posted @ 2017-04-09 23:05 Grandyang 阅读(21517) 评论(7) 推荐(0) 编辑
摘要:Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subs 阅读全文
posted @ 2017-04-07 23:38 Grandyang 阅读(8229) 评论(2) 推荐(1) 编辑
摘要:In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to s 阅读全文
posted @ 2017-04-06 22:52 Grandyang 阅读(5943) 评论(7) 推荐(0) 编辑
摘要:Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi 阅读全文
posted @ 2017-04-04 22:47 Grandyang 阅读(7427) 评论(5) 推荐(0) 编辑
摘要:Given two strings representing two complex numbers. You need to return a string representing their multiplication. Note i2 = -1 according to the defin 阅读全文
posted @ 2017-04-03 01:18 Grandyang 阅读(3504) 评论(0) 推荐(1) 编辑
摘要:Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j]. You need to return the number of important reverse pai 阅读全文
posted @ 2017-04-02 00:00 Grandyang 阅读(19107) 评论(11) 推荐(0) 编辑

Fork me on GitHub

喜欢请打赏

扫描二维码打赏

Venmo 打赏

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