Exercises

  1. Modify the addElement function of a singly linked list to add an item at any position.
  2. Write a function for reversing a singly linked list.
  3. Write the ADT for circular linked lists.
  4. Write an R function for creating, inserting, and searching for a circular linked list.
  5. Write a function which will return the index of an item for a linear linked list.

Get R Data Structures and Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.