Why would you define a getSize() function instead of having the application access the size of the linked list directly?

Skill/Topic: Stacks and Queues: Insert, Delete, Peek, Find
A) You use the getSize() function instead of having the application access the size of the linked list directly to protect the data from inadvertently being changed by the application.
Explanation: If the application needs to change the data, then the appropriate function is called and the function changes the data.

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions