博客

Code changes the world.

排序:
默认
按更新时间
按访问量

LeetCode 858 Mirror Reflection

LeetCode 858 Mirror Reflection 传送门 题目分析 There is a special square room with mirrors on each of the four walls. Except for the southwest corn...

2018-06-24 19:58:21

阅读数:112

评论数:0

LeetCode 859 Score of Parentheses

LeetCode 859 Score of Parentheses 传送门 题目分析 Given a balanced parentheses string S, compute the score of the string based on the following rule...

2018-06-24 18:56:47

阅读数:91

评论数:0

LeetCode 859 Buddy Strings

LeetCode 859 Buddy Strings 传送门 题目分析 Given two strings A and B of lowercase letters, return true if and only if we can swap two letters in A s...

2018-06-24 18:48:24

阅读数:143

评论数:0

LeetCode 855. Exam Room

LeetCode 855. Exam Room 传送门 题目分析 In an exam room, there are N seats in a single row, numbered 0, 1, 2, ..., N-1. When a student enters t...

2018-06-17 17:13:43

阅读数:212

评论数:0

LeetCode 853. Car Fleet

LeetCode 853. Car Fleet 传送门 题目分析 N cars are going to the same destination along a one lane road. The destination is target miles away. ...

2018-06-17 16:49:24

阅读数:159

评论数:0

LeetCode 842 Split Array into Fibonacci Sequence

LeetCode 842 Split Array into Fibonacci Sequence 传送门 题目分析 Given a string S of digits, such as S = "123456579", we can...

2018-05-27 23:44:22

阅读数:208

评论数:0

计蒜客2018 第四场 A. 贝壳找房均价计算

贝壳找房每个月都会计算各个城市房价的均价,计算的最后一步为: 将一个形如 X.YX.Y 的小数,用特殊近似法近似到整数。 计算完成后会将这个均价展示在首页供用户参考。 特殊近似法定义为:从最右边开始四舍五入到整数为止。 比如 4.445⇒4.45⇒4.5⇒54.445...

2018-05-24 11:35:51

阅读数:38

评论数:0

LeetCode 838 Push Dominoes

LeetCode 838 Push Dominoes 传送门 题目分析 There are N dominoes in a line, and we place each domino vertically upright. In the beginning, we si...

2018-05-24 11:27:31

阅读数:130

评论数:0

LeetCode 829. Consecutive Numbers Sum

LeetCode 829 Consecutive Numbers Sum 传送门 题目分析 Given a positive integer N, how many ways can we write it as a sum of consecutive positive inte...

2018-05-11 21:06:45

阅读数:119

评论数:1

PAT 1016. Phone Bills (25)

PAT 1016. Phone Bills (25) 题目分析 原题相信大家都看见了,题目几乎不涉及算法,主要就是考大家的细心,题目大意就是给我们所有用户的长途电话记录,根据用户分组,计算每个用户需要交的电话费,打印账单,这个题隐含着如果一个用户没有一次完整的打电话记录就不输出,我起初在这...

2018-05-08 19:12:41

阅读数:5

评论数:0

LeetCode 826 Most Profit Assigning Work

LeetCode 826 Most Profit Assigning Work 传送门 题目分析 We have jobs: difficulty[i] is the difficulty of the ith job, and profit[i] is the profit of...

2018-04-29 17:08:04

阅读数:70

评论数:0

LeetCode 825 Friends Of Appropriate Ages

LeetCode 825 Friends Of Appropriate Ages 传送门 题目分析 Some people will make friend requests. The list of their ages is given and ages[i] is the a...

2018-04-29 16:53:43

阅读数:217

评论数:0

LeetCode 824 Goat Latin

LeetCode 824 Goat Latin 传送门 题目分析 A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase ...

2018-04-29 16:39:05

阅读数:208

评论数:0

LeetCode 567 Permutation in String

LeetCode 567 Permutation in String 传送门 题目分析 Given two strings s1 and s2, write a function to return true if s2 contains the permutation...

2018-04-24 21:19:02

阅读数:3

评论数:0

LeetCode 820 Short Encoding of Words

LeetCode 820 Short Encoding of Words 传送门 题目分析 Given a list of words, we may encode it by writing a reference string S and a list of indexes A...

2018-04-23 20:57:48

阅读数:66

评论数:0

LeetCode 821 Card Flipping Game

LeetCode 821 Card Flipping Game 传送门 题目分析 On a table are N cards, with a positive integer printed on the front and back of each card (possibly...

2018-04-23 20:28:53

阅读数:175

评论数:0

LeetCode 821 Shortest Distance to a Character

LeetCode 821 Shortest Distance to a Character 传送门 题目分析 Given a string S and a character C, return an array of integers representing the short...

2018-04-23 20:06:38

阅读数:37

评论数:0

LeetCode 807 Max Increase to Keep City Skyline

LeetCode 807 Max Increase to Keep City Skyline 传送门 题目分析 In a 2 dimensional array grid, each value grid[i][j] represents the height of a build...

2018-03-25 22:30:48

阅读数:192

评论数:0

LeetCode 804 Unique Morse Code Words

LeetCode 804 Unique Morse Code Words 传送门 题目分析 International Morse Code defines a standard encoding where each letter is mapped to a series ...

2018-03-25 22:22:55

阅读数:232

评论数:0

LeetCode 796 Rotate String

LeetCode 796 Rotate String 传送门:LeetCode 796 题目分析 题目原文: We are given two strings, A and B. A shift on A consists of taking string A and ...

2018-03-11 15:50:59

阅读数:40

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭