随笔分类 - 解题通用技巧
摘要:2021-07-25 18:38:58 dict删除key: dict.pop(key, Default=None) Counter([*]): 对list进行计数操作 ord() / chr(): ord('a') 返回ascii, chr(0) 返回ascii中对应的字符 list删除指定idx
阅读全文
摘要:REF: https://grantjenks.com/docs/sortedcontainers/ python 优先队列 (默认从小到大排列) SortedList: from sortedcontainers import SortedList 增加元素: sl.add(item) 查询元素:
阅读全文
摘要:2020-04-06 17:54:20 问题描述: 计算an % b,其中a,b和n都是32位的非负整数。 样例 例如 231 % 3 = 2 例如 1001000 % 1000 = 0 挑战 O(logn) 问题求解: public int fastPower(int a, int b, int
阅读全文

浙公网安备 33010602011771号