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
- Comparison between different data structures
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
matplotlib
pip install matplotlib
- 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