I am having a programming exam ,and we have studied arrays ,files ,and linkedlist ,hash tables ::the question is in what cases is the best choice to use one of these !! because most of the mark goes to how & what kind i used in implementing the program that reduces time complexity ! so please briefly could someone tell me how to decide to pick one among the choices (arrays or linear linkedlist ,hash table ) .


Thanks in advance

Depends on the type of program.
If you have constant amount data and u know that before compile time use arrays and if the data is going to be entered at run time and the exact number of total data is not known, use linked lists.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.