Assignment 1 - Implement a Singly Linked List and a Circular Queue
Design two separate classes in C++:
- Singly Linked List
● Support insertion at the front, insertion at the end, deletion of a given value, search for a value, and printing all elements.
● Write a main function that demonstrates all supported operations on the linked list.
- Circular Queue Using Array
● Create a CircularQueue class using a fixed-size array and two pointers (front and rear).
● Implement enqueue, dequeue, isEmpty, isFull, and printQueue methods.
● Write a main function that demonstrates enqueuing, dequeuing, and edge case handling (overflow/underflow) for the circular queue.
● Use clear class structures and separate implementations for each data structure.
● Do not use standard library containers like std::list or std::queue for the main logic—you must create the underlying structure yourself.
● Well-commented code and basic error handling are expected.
● Implement a function to reverse the entire linked list in place.
● Add a peek function to your circular queue that returns the value at the front without removing it.