前言 面试题:如何统计数组中出现次数最多的数据,按出现次数由大到小排序 这个排序看似简单,涉及到的基础知识点还是很多的,真正写起来并不容易 备注:本篇是以python3.6讲解的,python2会多一个cmp参数,cmp函数在python3上已经丢弃了 cmp(x,y) 函数用于比较2个对象,如果 x < y 返回 -1, 如果 x == y 返回 0, 如果 x > y 返回 1. 保存数据 1.首先应该提出队列里面有多少个数据,做去重处理,去重最快的办法计算用到set集合了 a = [&q
[抄题]: There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of non-empty words from the dictionary, where words are sorted lexicographically by the rules of this new langu