摘要:
今天面试一个小伙问旋转数组的二分搜索,https://leetcode.cn/problems/search-in-rotated-sorted-array 我自己先写了一份代码如下,是不是觉得很丑陋,重复代码较多? class Solution: def search(self, nums: Li 阅读全文
摘要:
Converting Boolean-Logic Decision Trees to Finite State Machines for simpler, high-performance detection of cybersecurity events 将布尔逻辑决策树转换为有限状态机 用于更简 阅读全文
摘要:
Python 求两个 list 的交集、并集、差集、和集 此处是对 list 进行运算,而非 set。 import collections from functools import reduce a = [1,2,3,3,4] b = [3,3,4,5,6] aa = collections.C 阅读全文
摘要:
总结算法模板: from typing import ( List, ) class Solution: """ @param a: an integer array @param v: an integer array @param m: An integer @return: an array 阅读全文