上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: Question Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. 阅读全文
posted @ 2020-01-09 23:34 sbj123456789 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Question There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank an 阅读全文
posted @ 2020-01-08 10:22 sbj123456789 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Question Given two strings text1 and text2, return the length of their longest common subsequence. A subsequence of a string is a new string generated 阅读全文
posted @ 2019-09-22 07:27 sbj123456789 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Question Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 即求最长回文子串(注意和最长回文子序列的区别,子串 阅读全文
posted @ 2019-09-21 08:24 sbj123456789 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Question Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Example 1: Input: 阅读全文
posted @ 2019-07-30 18:21 sbj123456789 阅读(129) 评论(0) 推荐(0) 编辑
摘要: python中乘号*常被用于快速初始化list,但有一个隐患: 被乘号复制的对象都指向同一个空间。当被复制对象为不可变类型时,不会出现问题,但当当被复制对象为可变类型时,若有一个引用改变这块存储空间,其他引用该存储空间的列表也会发生改变。 用id()可以验证其指向的空间 所以更安全的创建初始化lis 阅读全文
posted @ 2019-07-30 15:06 sbj123456789 阅读(868) 评论(0) 推荐(0) 编辑
摘要: 错误示范 写python时常常会遇到想删除list中的特定值的元素的情况,但如果用一个循环遍历的话显然是行不通的,比如 或者 都会出现问题,因为pop()或remove()之后list已经发生改变,继续迭代会出现问题。 因此,由于list底层基于线性表(数组)的特性,不能使用这种方法删除,要用其他方 阅读全文
posted @ 2019-07-26 20:32 sbj123456789 阅读(13385) 评论(0) 推荐(0) 编辑
摘要: 如,要 kill 掉进程信息中匹配到 swoole 相关的进程 ps aux | grep swoole | awk '{print $2}' | xargs kill -9 ps 列出所有进程 a - 显示现行终端机下的所有进程,包括其他用户的进程; u - 以用户为主的进程状态 ; x - 通常 阅读全文
posted @ 2019-07-24 16:22 sbj123456789 阅读(1900) 评论(0) 推荐(0) 编辑
摘要: 准确率 Accuracy 精确率 Precision 召回率 Recall F1(综合Precision与Recall) ROC曲线 PR曲线 阅读全文
posted @ 2019-07-19 18:06 sbj123456789 阅读(2366) 评论(0) 推荐(0) 编辑
摘要: 执行python文件的时候有时候会出现这个报错: ImportError: dlopen: cannot load any more object with static TLS 原因有点奇怪,可能是因为import的包太多了 把你报错的那个包放到最前面import,或者多搞几个文件,每个文件少一些 阅读全文
posted @ 2019-07-19 17:31 sbj123456789 阅读(8822) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页