Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inneficient lifo stack in Lua #536

Open
xopxe opened this issue Apr 25, 2019 · 1 comment
Open

Inneficient lifo stack in Lua #536

xopxe opened this issue Apr 25, 2019 · 1 comment

Comments

@xopxe
Copy link

xopxe commented Apr 25, 2019

The lifo stack at:
https://github.com/kennyledet/Algorithm-Implementations/blob/master/Depth_First_Search/Lua/Yonaba/utils/lifo.lua
Inserts aand removes from the begining of the array. this causes a renumbering of the array after each push or pop.
It is better to store the stack reversed, with the last element at the last position.

@kennyledet
Copy link
Owner

How's it going keshav,

This was implemented by one of our top contributors @Yonaba , but way back in 2014. You're more than welcome to update on top of this and contribute an optimized implementation!

Best,
Kendrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants