1 class Solution: 2 def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]: 3 sorted_nums = sorted(nums) 4 n = len(nums) 5 index = 0 6 dic ...
分类:
其他好文 时间:
2020-03-01 14:29:42
阅读次数:
56
108. Convert Sorted Array to Binary Search Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this ...
分类:
编程语言 时间:
2020-02-29 22:03:51
阅读次数:
78
1. 内建属性 2. 内建函数 range map filter reduce sorted 1. 内建属性 python3中查看类的内建属性和方法: 1 >>> class Person: 2 ... pass 3 ... 4 >>> dir(Person) 5 ['__class__', '__ ...
分类:
其他好文 时间:
2020-02-28 21:08:38
阅读次数:
109
本文是《Redis内部数据结构详解》系列的第六篇。在本文中,我们围绕一个Redis的内部数据结构——skiplist展开讨论。 Redis里面使用skiplist是为了实现sorted set这种对外的数据结构。sorted set提供的操作非常丰富,可以满足非常多的应用场景。这也意味着,sorte ...
分类:
其他好文 时间:
2020-02-27 13:20:09
阅读次数:
64
一、 SortedSet集合直接举例 package com.bjpowernode.java_learning; import java.util.*; /** * java.util.Set * java.util.SortedSet;无序不可以重复,但是存进去的元素可以按照元素大小顺序自动进行 ...
分类:
编程语言 时间:
2020-02-27 00:57:20
阅读次数:
78
1 """ 2 Given an array of strings, group anagrams together. 3 Example: 4 Input: ["eat", "tea", "tan", "ate", "nat", "bat"], 5 Output: 6 [ 7 ["ate","ea ...
分类:
其他好文 时间:
2020-02-25 23:04:37
阅读次数:
68
Paper——SIGCOMM 17 : Reading SketchVisor Robust Network Measurement for Sofeware Packet Processing A Partial User-space Implementation of SketchVisor's ...
分类:
其他好文 时间:
2020-02-25 18:13:19
阅读次数:
81
在网上看到了一个题:输入一个字符串,判断该字符串是否可以作为密码。可作为密码的条件:必须是包含大小写字母和数字的组合,不能使用特殊字符,长度在8-10之间。以下代码,仅为抛砖引玉:tmp=set()result="不符合"flag="123"ifa.isalnum()and8<=len(a)<=10:forxina:ifx.isdigit():tmp.add("1")elifx.isl
分类:
其他好文 时间:
2020-02-24 22:24:44
阅读次数:
89
Given a sorted integer array, remove duplicate elements. For each group of elements with the same value do not keep any of them. Do this in-place, usi ...
分类:
其他好文 时间:
2020-02-24 09:17:03
阅读次数:
77
https://www.cnblogs.com/raymoc/p/5323824.html 大表对小表应该使用MapJoin ,set hive.auto.convert.join=true;让hive自动识别,把join变成合适的Map Join 大表对大表 set hive.auto.conve ...
分类:
其他好文 时间:
2020-02-23 20:24:57
阅读次数:
64