Skip to content

a-tharva/algorithm-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

algorithm-comparison

Introduction

Python script to compare time required for different search algorithms to search an element in sorted array of size 10000000 elements.
!! There are total 10000000 elements in the search script array. It will take around 280mb size.

  • Comparison between different search algorithms

Figure_1

  • Comparison between different data structures

insertion

Comparison started

- hash initialized
insertion started - time for insertion : 69.09203767776489

- list initialized
insertion started - time for insertion : 0.28620171546936035

- linkedlist initialized
insertion started - time for insertion : 671.5376222133636

- queue initialized
insertion started - time for insertion : 0.06204342842102051

- stack initialized
insertion started - time for insertion : 129.7791130542755

Modules

matplotlib

pip install matplotlib

Development

  • I will make the code clean and add multiple arrays to compare different algorithms on different size arrays.
  • Add search in data structure
  • Clean old code

Releases

No releases published

Packages

No packages published

Languages