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

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -