05 2022 档案

摘要:下面是有用的参考链接 参考链接 阅读全文
posted @ 2022-05-25 14:38 Notomato 阅读(29) 评论(0) 推荐(0) 编辑
摘要:参考链接 python调用dll是,要使用绝对路径,不然会存在其他包import这个包是发生错误 import os from ctypes import * dllpath = os.path.abspath(r"D:\python********\****\**\*******.dll") dl 阅读全文
posted @ 2022-05-24 20:43 Notomato 阅读(173) 评论(0) 推荐(0) 编辑
摘要:介绍 Go的list是一个双向链表,链表可以高效的删除插入元素,很多场景是需要用到这个结构的,比如cache 使用 list在包container/list下,可以通过NeW()初始化或者var声明 两种方法如下 mylist := list.New() var mylist list.List 常 阅读全文
posted @ 2022-05-20 10:51 Notomato 阅读(1094) 评论(0) 推荐(0) 编辑
摘要:本文主要介绍Golang的堆排序使用方法,通过container/heap实现堆相关的操作 堆因为其插入删除的操作时间复杂度低,因此优先队列通常是靠堆来实现的。Go的堆使用要实现heap包下的Interface接口 type Interface interface { sort.Interface 阅读全文
posted @ 2022-05-19 17:35 Notomato 阅读(165) 评论(0) 推荐(0) 编辑
摘要:python heapq相关操作 heapq 的一些常用方法: heapify(list)将列表转换为小根堆的数据结构。 heappush(heap, x),将 x 加入堆中。 heappop(heap),从堆中弹出最小的元素。 heapreplace(heap, x),弹出最小的元素,并将 x 加 阅读全文
posted @ 2022-05-19 16:50 Notomato 阅读(862) 评论(0) 推荐(0) 编辑
摘要:sort包简介 官方文档 Golang的sort包用来排序,二分查找等操作。本文主要介绍sort包里常用的函数,通过实例代码来快速学会使用sort包 sort包内置函数 sort.Ints(x []int) ints := []int{1, 4, 3, 2} fmt.Printf("%v\n", i 阅读全文
posted @ 2022-05-16 17:18 Notomato 阅读(503) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示