1 class Solution: 2 def rankTeams(self, votes: 'List[str]') -> str: 3 dic = {} 4 n = len(votes) 5 m = len(votes[0]) 6 mat = [[0 for _ in range(26)] fo ...
分类:
其他好文 时间:
2020-03-01 14:30:28
阅读次数:
118
Array LeetCode Given an integer array of size n, find all elements that appear more than ? n/3 ? times. The algorithm should run in linear time and i.... ...
分类:
其他好文 时间:
2020-03-01 14:18:51
阅读次数:
71
译自:https://ruslanspivak.com/lsbasi part2/ (已获作者授权) 在他们的著作《有效思维的五个要素》(The 5 Elements of Effective Thinking)中,Burger和Starbird分享了一个故事,讲述了他们如何观察国际知名的小号演奏家 ...
分类:
其他好文 时间:
2020-03-01 12:36:46
阅读次数:
59
什么是锁 在单线程情况下,看下面代码: public class Test { // 计数器 private Integer count = 0; // 累加操作 public void addOne() { count += 1; } // 获取计算器的值 public Integer getCo ...
分类:
编程语言 时间:
2020-03-01 12:17:32
阅读次数:
66
题目来源力扣第九题,链接:https://leetcode-cn.com/problems/palindrome-number 判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。 示例 1: 输入: 121输出: true示例 2: 输入: -121输出: fa ...
分类:
其他好文 时间:
2020-03-01 10:41:23
阅读次数:
62
TreeMap和TreeSet即Java中利用二叉搜索树实现的Map和Set
分类:
编程语言 时间:
2020-03-01 10:33:50
阅读次数:
73
1 """ 2 Evaluate the value of an arithmetic expression in Reverse Polish Notation. 3 Valid operators are +, -, *, /. Each operand may be an integer or ...
分类:
其他好文 时间:
2020-03-01 09:15:40
阅读次数:
51
【题目】 一个栈依次压入1,2,3,4,5;那么从栈顶到栈底分别为5,4,3,2,1.。将栈转置 【要求】 只能用递归函数来实现。 【分析】 该算法需要两个递归函数。分别是 getAndRemoveLastElement() 和 Reverse() |函数名|描述| | | | |getAndRem ...
分类:
其他好文 时间:
2020-02-29 18:43:12
阅读次数:
69
MySQL 数据类型 MySQL中定义数据字段的类型对你数据库的优化是非常重要的。 MySQL支持多种类型,大致可以分为三类:数值、日期/时间和字符串(字符)类型。 数值类型 MySQL支持所有标准SQL数值数据类型。 这些类型包括严格数值数据类型(INTEGER、SMALLINT、DECIMAL和 ...
分类:
数据库 时间:
2020-02-29 13:16:44
阅读次数:
256
A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Wri ...
分类:
其他好文 时间:
2020-02-29 11:42:15
阅读次数:
107