TheAlgorithms-Python/data_structures
Vaibhav Singh 96df906e7a
All suggeted changes within additional time limit tests (#1815)
* With all suggested changes  

possibly covered all the recommended guidelines

* Updated with both slow and faster algorithms

possibally covered all the recomendations

* removed the time comparision part!

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Add benchmark using timeit

https://docs.python.org/3/library/timeit.html

The performance delta between these two implementation is quite small...
```
next_greatest_element_slow(): 1.843442126
     next_greatest_element(): 1.828941414
```

* Optimize slow() to create fast() - Three algorithms in the race

Three algorithms in the race

* Use a bigger test array with floats, negatives, zero

* Setup import next_greatest_element_fast

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-03-27 08:16:07 +01:00
..
binary_tree contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
data_structures/heap pyupgrade --py37-plus **/*.py (#1654) 2020-01-03 22:25:36 +08:00
disjoint_set Add disjoint set (#1194) 2019-09-23 05:08:20 +02:00
hashing Fix rehashing function will not call insert_data function (#1803) 2020-03-16 11:19:13 +01:00
heap Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
linked_list Added SkipList (#1781) 2020-03-05 17:57:43 +01:00
queue contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
stacks All suggeted changes within additional time limit tests (#1815) 2020-03-27 08:16:07 +01:00
trie Add delete to trie.py + tests (#1177) 2019-09-13 22:24:25 +02:00