Skip to content

Latest commit

 

History

History
15 lines (14 loc) · 1.68 KB

File metadata and controls

15 lines (14 loc) · 1.68 KB

Content

The files include python implementation of some algorithms and data structures:

  • find_union_tree.py includes tree implementation of find-union sets. The structure is described in [1];
  • eratosthenes_sieve.py contains prime number generator which uses Sieve of Eratosthenes;
  • list_based_dict.py implements a dictionary that stores a list of key-value pairs and mimics the interface of the built-in dict type,
  • diff.py is a file comparison program based on a generalized algorithm finding the longest common subsequence,
  • hanoi_tower.py solves Tower of Hanoi (using a recursive algorithm) and visualizes the solution (using pyglet),
  • word2word.py solves Doublets (A Word Puzzle By Lewis Carroll) using BFS,
  • sort_complexity.py - sorting by swapping with minimum and merge sort with time complexity plots + binary search,
  • newton.py - various methods for calculating binomial coefficients,
  • segment_tree_point_range_sum.py and segment_tree_point_range_sum_customizable.py - Segment Tree with single value updates and range queries
  • centroid_decomposition.py - centroid decomposition of the tree to calculate the shortest path in the logarithmic time

Bibliography/references

[1] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein Introduction to Algorithms