java - Performance difference between arrays, stacks and queues -


what search performance of arrays, stacks , queues?

i think arrays quickest , straightforward, because can access element calling using index. correct? performance of stacks , queues? how compare?

it depends how search (or search algorithm) implemented. stack or queue may helpful searching application - bfs, dfs. in normal case when using linear search can consider array or arraylist.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -