I want to write a method to remove consecutive items with duplicate data values from a singly linked list. The method should return the number of items removed. The method should clean up memory as required, and should assume that memory was allocated using new.
For example, passing in the list
->a->b->c->c->a->b->b->b->a->null
should result in
->a->b->c->a->b->a->null...
User Profile
Collapse
-
C++ - Single Linked List - Ideas
-
C++ Coding Logic - Various Ideas
I want to write a method to determine if a given string is a palindrome. E.g. "Madam I'm Adam", or "A man, a plan, a canal, Panama".
The prototype for the function is:
Code:bool is_palindrome(char const * str)
But, i would like to know how many efficient ways to do...
No activity results to display
Show More