User Profile

Collapse

Profile Sidebar

Collapse
sankaran1984
sankaran1984
Last Activity: Aug 25 '10, 03:56 AM
Joined: Jul 3 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sankaran1984
    started a topic C++ - Single Linked List - Ideas
    in C

    C++ - Single Linked List - Ideas

    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...
    See more | Go to post

  • sankaran1984
    started a topic C++ Coding Logic - Various Ideas
    in C

    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)
    I have a simple logic to check for equality by moving forward & backward from extreme ends of the string.
    But, i would like to know how many efficient ways to do...
    See more | Go to post
No activity results to display
Show More
Working...