上一页 1 ··· 158 159 160 161 162 163 164 165 166 ··· 273 下一页
摘要: Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it without using any loop / recursion? 其他: Method 1 阅读全文
posted @ 2018-04-17 00:31 bonelee 阅读(250) 评论(3) 推荐(0)
摘要: Given an integer, write a function to determine if it is a power of two. 阅读全文
posted @ 2018-04-16 22:45 bonelee 阅读(190) 评论(0) 推荐(0)
摘要: Mirai变种中的DGA 分享到: 分享到: 分享到: 发布时间:2016-12-12 16:02:57 作者:360网络安全研究院 投稿方式:发送邮件至linwei#360.cn,或登陆网页版在线投稿 那个导致美国断网的Mirai 又出现带DGA变种,内置了域名生成算法。 连续导致美国和德国断网事 阅读全文
posted @ 2018-04-16 16:25 bonelee 阅读(3338) 评论(0) 推荐(0)
摘要: def qsort(arr, start, end): if start > end: return def partition(arr, start, end): pivot = arr[start] i = start+1 while i start: arr[start], arr[end] ... 阅读全文
posted @ 2018-04-16 10:38 bonelee 阅读(588) 评论(0) 推荐(0)
摘要: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2018-04-15 22:00 bonelee 阅读(176) 评论(0) 推荐(0)
摘要: We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra 阅读全文
posted @ 2018-04-15 19:55 bonelee 阅读(240) 评论(0) 推荐(0)
摘要: Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: Example 1: Example 2: 阅读全文
posted @ 2018-04-14 23:32 bonelee 阅读(254) 评论(0) 推荐(0)
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: 阅读全文
posted @ 2018-04-14 22:33 bonelee 阅读(285) 评论(0) 推荐(0)
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2018-04-14 13:09 bonelee 阅读(294) 评论(0) 推荐(0)
摘要: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: stack 迭代解法: BFS:(和dfs st 阅读全文
posted @ 2018-04-14 12:58 bonelee 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 158 159 160 161 162 163 164 165 166 ··· 273 下一页