Question
What is the difference between iterator access and index access

Answers

Index based access allow access of the element directly on the basis of index. The cursor of the datastructure can directly goto the 'n' location and get the element. It does not traverse through n-1 elements.

In Iterator based access, the cursor has to traverse through each element to get the desired element.So to reach the 'n'th element it need to traverse through n-1 elements.

Insertion,updation or deletion will be faster for iterator based access if the operations are performed on elements present in between the datastructure.

Insertion,updation or deletion will be faster for index based access if the operations are performed on elements present at last of the datastructure.

Traversal or search in index based datastructure is faster.

ArrayList is index access and LinkedList is iterator access.   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q Zoology job roles and responsibilities? Zoology job duties?
  • Q Should museums be free?
  • Q Classification/rating per orange book for products found not to be bioequiv to innovator and may not be substituted for each other
  • Q Nariyal is the Indian term for which nut?
  • Q Dandi March year?
  • Q Which is the oldest sports museum in the world ?
  • Q List some of the 8051 microcontroller manufacturers?
  • Q Ampere is the Unit of :
  • Q Which President of the Muslim League made the 'Allahabad Address' on 29 December 1930, demanding the creation of 'a Muslim India within India'?
  • Q Explain Xylem
  • Q Why are "financials", the first module implemented in many indian erp implementations?