/Data_sturcture_algorithms

data structures and algorithms implemented with Python

Primary LanguagePython

Data_sturcture_algorithms

This is personal practice and learning on data structure and algorithms implemented with Python 3. I comment the code with detail explanation and my understanding for reviewing.

  • todo means that does not include in the reference book but I think which is necessary and related to the content in each chapter and I will supplement such parts one by one.

Source

The reference book is <Problems Solving with Algorithms and Data Structures Using Python(Second Edition)>.

My handwritting notes in Chinese(PDF) writing in Goodnotes on IPAD

Chapter 1: Euclid's method to get the greatest common divisor; compare the fraction and logistic gate
Chapter 2: basic data structures: list and dictionary

  • detect the two strings has different order but same chars

Chapter 3: linear data structures, including stack,queue and dequeue, array

  • match the parethess, palindrome detection. base conversion

Chapter 4: Recursion and dynamic programming

  • Tower of Hanoi, base conversion with recursion, Sierpinski triangle and change money with memo and recursion, as well as implementation with dynamic programming
  • todo: Bag problem and edit distance

Chapter 5: Search(sequential&binary) and sort(bubble,insertion,selection,merge,shell and quick sort)

  • todo: Bucket sort; count sort, heap sort, base sort

Chapter 6: Tree

  • Binary tree, binary heap for priority queue, binary search Tree(BST), AVL and pre/in/post order iteration
  • todo: Morris Iteration, TrieTree

Chapter 7: Graph

  • Graph implmentation using linked list, BFS DFS, shortest path with Djikstra and MST with Prim.
  • todo: Kruskal, BellMan-ford,Floyd

Attach Part

  • Arraylist, RSA encryption, SkipList, image processing and pattern match.
  • todo: the implementation for KMP