![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
HarryPoFly
这个作者很懒,什么都没留下…
展开
-
python快速排序
# coding:utf-8 def quick_sort(alist: list, first: int, last: int) -> list: """快速排序 :rtype: object """ if first >= last: return mid_value = alist[first] low = first high = last while low < high: #原创 2022-03-27 12:02:42 · 421 阅读 · 0 评论 -
python冒泡排序的实现
冒泡排序python实现方式原创 2022-01-08 08:39:44 · 388 阅读 · 0 评论 -
python实现队列
class Dequeue(object): '''队列''' def __init__(self): self.__list = [] def add_front(self, item): """往队列中添加一个item元素""" self.__list.insert(0, item) def add_rear(self, item): """往队列中添加一个item元素""" self原创 2021-12-26 08:48:47 · 167 阅读 · 0 评论 -
python栈的实现
栈用python的方式实现原创 2021-12-19 12:39:04 · 406 阅读 · 0 评论 -
python双向链表的实现
双向链表,用python实现方式原创 2021-12-19 12:36:09 · 987 阅读 · 0 评论 -
单链表的实现
#coding:utf-8 class Node(object): '''节点''' def __init__(self, elem): self.elem = elem self.next = None class SingleLinkList(object): '''单链表''' def __init__(self, node=None): self._head = node def is_empty.原创 2021-11-07 13:16:05 · 75 阅读 · 0 评论