Question: Swap the value of the second node with the value of the node before last. Swap the last node with the node before last. Swap

  1. Swap the value of the second node with the value of the node before last.
  2. Swap the last node with the node before last.
  3. Swap the value of the last node with the value of the node before last.
  4. Move the first two nodes (or more) to the end of the calling object. This will require resetting pointer first, and last if it is a doubly-linked list, and all other necessary pointers to connect the list.
  5. Move the last two nodes (or more) to the front of the calling object. This will require resetting pointer first, and last if it is a doubly-linked list, and all other necessary pointers to connect the list.
  6. Search for specific values (all odds, all evens, all multiples of some integer, etc.) and return the number of occurrences.
  7. Search for specific values (all odds, all evens, all multiples of some integer, etc.) and add a node at the end (or beginning) of the list. The node will store the number of occurrences.
  8. Search for specific values (all odds, all evens, all multiples of some integer, etc.) and return true if at least one occurrence of that specific value is found.
  9. Rotate a list to the left (or right) by rotating the nodes. You will need to reset pointers.
  10. Rotate a list to the left (or right) by rotating the values stored in the nodes. No pointers will be reset.

PLEASE HELP ME TO WRITE THESE FUNCTIONS FOR STUDY c++

THESE FUNCTIONS HAVE NO PARAMETERS

thank you so much

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!