12 2017 档案

摘要:Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temp 阅读全文
posted @ 2017-12-24 10:37 Grandyang 阅读(10963) 评论(5) 推荐(0) 编辑
摘要:Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. (Recall that an integer has m 阅读全文
posted @ 2017-12-19 23:43 Grandyang 阅读(4931) 评论(2) 推荐(0) 编辑
摘要:Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are s 阅读全文
posted @ 2017-12-17 23:49 Grandyang 阅读(6762) 评论(0) 推荐(0) 编辑
摘要:You are given a string expression representing a Lisp-like expression to return the integer value of. The syntax for these expressions is given as fol 阅读全文
posted @ 2017-12-15 23:48 Grandyang 阅读(4835) 评论(1) 推荐(0) 编辑
摘要:We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign r 阅读全文
posted @ 2017-12-13 23:41 Grandyang 阅读(5523) 评论(0) 推荐(1) 编辑
摘要:Given an array consisting of n integers, find the contiguous subarray whose length is greater than or equal to k that has the maximum average value. A 阅读全文
posted @ 2017-12-11 06:41 Grandyang 阅读(12196) 评论(0) 推荐(1) 编辑
摘要:Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are s 阅读全文
posted @ 2017-12-10 09:42 Grandyang 阅读(6540) 评论(0) 推荐(0) 编辑
摘要:Implement a MyCalendarThree class to store your events. A new event can always be added. Your class will have one method, book(int start, int end). Fo 阅读全文
posted @ 2017-12-08 13:53 Grandyang 阅读(5024) 评论(1) 推荐(1) 编辑
摘要:在使用python爬虫提取中文网页的内容,为了能正确显示中文的内容,在转为字符串时一定要声明编码为utf-8,否则无法正常显示中文,而是显示原编码的字符,并没有正确转换。比如下面这个简单的爬取百度页面的title的示例: 如果不在tostring函数中正确配置的话,会打印出: 而正确的应该是: 阅读全文
posted @ 2017-12-06 01:36 Grandyang 阅读(5720) 评论(0) 推荐(1) 编辑
摘要:An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2017-12-05 23:23 Grandyang 阅读(11063) 评论(2) 推荐(0) 编辑
摘要:Implement a MyCalendarTwo class to store your events. A new event can be added if adding the event will not cause a triple booking. Your class will ha 阅读全文
posted @ 2017-12-03 23:50 Grandyang 阅读(8388) 评论(2) 推荐(1) 编辑
摘要:Given a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7. A subsequence of a str 阅读全文
posted @ 2017-12-01 14:13 Grandyang 阅读(7492) 评论(9) 推荐(0) 编辑

Fork me on GitHub