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
Post a Comment