上一页 1 ··· 164 165 166 167 168 169 170 171 172 ··· 273 下一页
摘要: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans 阅读全文
posted @ 2018-03-27 22:36 bonelee 阅读(188) 评论(0) 推荐(0)
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2018-03-27 22:18 bonelee 阅读(204) 评论(0) 推荐(0)
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. Roman Numerals Chart M=1000 D = 500 I 1 XX 阅读全文
posted @ 2018-03-27 21:23 bonelee 阅读(371) 评论(0) 推荐(0)
摘要: import re pattern = re.compile( r'^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|' r'([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|' r'([a-zA-Z0-9][-_.a-zA-Z0-9]{0,61}[a-zA-Z0-9]))\.' r'([a... 阅读全文
posted @ 2018-03-27 12:01 bonelee 阅读(4831) 评论(0) 推荐(0)
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2018-03-26 23:25 bonelee 阅读(193) 评论(0) 推荐(0)
摘要: 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 @ 2018-03-26 23:22 bonelee 阅读(465) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/qtlyx/article/details/50780400 最后的效果就是这样的。很明显可以看到,左下角那个有点像三角函数的关系,Pearson系数(就是线性相关系数)为0,而MIC则有0.8。 摘自:http://tech.ifeng.com/a/20 阅读全文
posted @ 2018-03-26 16:11 bonelee 阅读(26975) 评论(0) 推荐(2)
摘要: Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n 阅读全文
posted @ 2018-03-25 20:46 bonelee 阅读(202) 评论(0) 推荐(0)
摘要: For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i 阅读全文
posted @ 2018-03-25 20:28 bonelee 阅读(216) 评论(0) 推荐(0)
摘要: Given an m * n matrix M initialized with all 0's and several update operations. Operations are represented by a 2D array, and each operation is repres 阅读全文
posted @ 2018-03-25 12:34 bonelee 阅读(190) 评论(0) 推荐(0)
上一页 1 ··· 164 165 166 167 168 169 170 171 172 ··· 273 下一页