@SuppressWarnings("unchecked") public class CircleDeque<E> { private int front; private int size; private E[] elements; private static final int DEFAULT_CAPACITY = 10; public CircleDeque() { elements = (E[]) new Object[DEFAULT_CAPACITY]; }…
写在前面的话:关于数据结构与算法讲解的书籍很多,但是用python语言去实现的不是很多,最近有幸看到一本这样的书籍,由Brad Miller and David Ranum编写的<Problem Solving with Algorithms and Data Structures Using Python>,地址为:http://interactivepython.org/runestone/static/pythonds/index.html是英文的,写的不错,里面代码的实现也很详细,很多…
一.概述 用Python实现的数据结构与算法 涵盖了常用的数据结构与算法(全部由Python语言实现),是 Problem Solving with Algorithms and Data Structures using Python(简写为PSADSP)的读书笔记. PSADSP 对经典的数据结构与算法进行了全面而细致地讲解,有兴趣的读者可以直接阅读该书.根据个人的学习进度,本文当前只摘取和总结了书中的部分内容,后续会逐步更新. 二.目录 基本数据结构 用Python实现的数据结构与算法:堆…