Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules ...
分类:
其他好文 时间:
2019-10-29 13:13:00
阅读次数:
114
Compare two version numbers version1 and version2.If version1 > version2 return 1; if version1 < version2 return -1;otherwise return 0. You may assume ...
分类:
其他好文 时间:
2019-10-29 09:58:30
阅读次数:
85
memcache redis对比 1. Redis不仅仅支持简单的k/v类型的数据,同时还提供string(字符串)、list(链表)、set(集合)、zset(sorted set 有序集合)和hash(哈希类型)等数据结构的存储。memcache支持简单的数据类型,String。 2. Redi ...
分类:
系统相关 时间:
2019-10-29 00:18:53
阅读次数:
117
sort list.sort(cmp=None, key=None, reverse=False) sorted aaa=sorted(iterable,cmp=None, key=None, reverse=False) >>reverse=False时为正向排序,reverse=True时为反向 ...
分类:
其他好文 时间:
2019-10-28 12:31:00
阅读次数:
95
import java.util.* /** * 378. Kth Smallest Element in a Sorted Matrix * https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/descript... ...
分类:
其他好文 时间:
2019-10-28 00:44:03
阅读次数:
96
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate ...
分类:
其他好文 时间:
2019-10-27 23:13:50
阅读次数:
187
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any ...
分类:
其他好文 时间:
2019-10-27 20:26:49
阅读次数:
87
235. Lowest Common Ancestor of a Binary Search Tree Easy Easy Easy Given a binary search tree (BST), find the lowest common ancestor (LCA) of two give ...
分类:
其他好文 时间:
2019-10-27 18:33:31
阅读次数:
62
You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take them alternatively. Each pl ...
分类:
其他好文 时间:
2019-10-27 17:09:51
阅读次数:
88
1、Find memory used by an object 2、Combine a list of strings into a single string 3、Find elements that exist in either of the two lists 4、Track frequen ...
分类:
编程语言 时间:
2019-10-27 16:39:49
阅读次数:
93