Skip to content

krzysieknaw/Algorithms_and_Data_Structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Algorithms and Data Structures

Some of my tests and analysis done during Algorithms and Data Structures course

Dictionary and list speed comparison

Experiment idea:

  1. make list with a range numbers in it
  2. pick random number and check if is in the list
  3. repeat for dictionary (numbers as keys)

Results:

List speed

Speed comparison of:

  • concat
  • append
  • comprehension
  • list range
  • pop:
    • pop first
    • pop last

Results:
Nothing unexpected except one thing. I expected pop(0) to be O(n) and pop(1) -> O(1), while it looks like both are O(1). To check.

Stack

Stack implementation - stack class ("list like") witk some basic methods.
stack_bin_to_dec - practical test od Stack class. Function conwerting decimal numbers to "any-base" number.

Queue

Queue implementation - queue class ("list like") witk some basic methods.
queue_printer_simulator - practical test od Stack class. (Not finished yet)

About

Some of my tests and analysis done during "Problem Solving with Algorithms and Data Structures using Python" course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages