摘要: 1. InterruptedExceptions should never be ignored in the code, and simply logging the exception counts in this case as "ignoring". The throwing of the 阅读全文
posted @ 2019-05-04 01:30 JinleiZhang 阅读(1079) 评论(0) 推荐(0) 编辑
摘要: ``` Given a positive integer N, return the number of positive integers less than or equal to N that have at least 1 repeated digit. Example 1: Input: 阅读全文
posted @ 2019-04-11 20:30 JinleiZhang 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 解法一: 时间O(N LogN) 空间 O(N) 思路: 对于任意一个位置i, 假设i开花了, i 需要看下左侧离它最近的开花位置是不是i k 1, 或者看下右侧离它最近的位置是不是i + k + 1, 所以是个搜索问题. 搜索的话,我们知道有上下界查找,在java中,查数A的上界即找第一个大于该数 阅读全文
posted @ 2019-03-18 02:41 JinleiZhang 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 看这篇文章 https://www.programcreek.com/2011/10/java class instance initializers/ 阅读全文
posted @ 2019-03-14 00:29 JinleiZhang 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Write your MySQL query statement below select b.name, a.bonus from Employee b left join Bonus a on a.empId = b.empId where a.bonus 阅读全文
posted @ 2019-02-28 21:36 JinleiZhang 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 因为只有一张表,所以需要join才能拿到更多信息 通过abs(a.seat_id b.seat_id) = 1 找到相邻的座位 通过a.free = true and b.free = true 检查是否符合要求 最后通过distinct 和 order by 顺序输出 阅读全文
posted @ 2019-02-28 21:17 JinleiZhang 阅读(272) 评论(0) 推荐(0) 编辑
摘要: test text() 返回 test html() 返回 test val() 没值, val() 适用于有value属性的元素, 例如: input 阅读全文
posted @ 2019-02-02 05:33 JinleiZhang 阅读(97) 评论(0) 推荐(0) 编辑
摘要: git revert 你要回滚的提交id 例子: git revert XXXXX 表示提交id为XXXXX的操作被回滚掉, 同时会产生一个新的提交 git reset hard 你希望重置到的提交id 例子: git reset hard XXXXX 只可以回滚本地仓库 表示重置当前的head, 阅读全文
posted @ 2018-12-20 06:11 JinleiZhang 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 学习记录(错误和经验) 1.Python中实现动态的类型转换, 可以把希望转换为的类型,当做参数传入 2. 阅读全文
posted @ 2018-10-08 05:42 JinleiZhang 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目 : c++ class Solution { public: //how to prove this process //min min + k //max max k //如果min + k = max k 其它元素的取值范围一定是可以覆盖min + k, max k //所以是最小值是0 阅读全文
posted @ 2018-09-24 09:03 JinleiZhang 阅读(461) 评论(0) 推荐(0) 编辑