answersLogoWhite

0


Best Answer

The number of even nodes in any list is always half size of the list rounded down to the nearest integer. To round down you simply take the integral portion of the division. E.g., for a list of 5 nodes, nodes 2 and 4 are the even nodes, therefore there are only 2 even nodes. Thus: 5 / 2 = 2.5 = 2. A list of 4 nodes also has 2 even nodes, thus 4 / 2 = 2.0 = 2.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Calculate even numbers of nodes in link list in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp