Docsity

Data Structures and algorithms, Assignments of Data Structures and Algorithms

Toggle sidebar
bg1
CSL-221 Data structure & Algorithm
Semester 03
Objective(s): Upon completion of this lab session, students will be able to:
Exercise 1: Navigation Application for Commuters
Design a user-friendly navigation application to assist commuters traveling between their home
and Bahria University. The application must utilize a doubly linked list data structure to store the
sequence of directions for the route. Users should be able to add new route steps, delete the entire
route, and seamlessly navigate between home and university. Clear and concise navigation
instructions, including turning directions and approximate distances, must be provided for each
route step. Also show the reverse the route to navigate from Bahria University back to the user's
home.
Exercise 2: Web Browser
Consider a web browser that keeps track of the pages a user visits in a session using a doubly linked
list. Each node in the list represents a web page and contains the URL of the page, the title of the
page, and pointers to the previous and next pages in the history.
Write a program that implements the above scenario with the following functionalities
i. Insert the web page at the end of the double link list.
ii. Display all pages in backward and forward directions.
iii. Delete the web page from any position.
Lab 8: Implementation of Doubly Linked List CLO2, PLO4, P4
Implement the functions of Doubly Linked List
•
Insertion
•
Deletion
•
Traversing
•
Search
pf3

Partial preview of the text

Download Data Structures and algorithms and more Assignments Data Structures and Algorithms in PDF only on Docsity!

Semester 03 Objective(s): Upon completion of this lab session, students will be able to: Exercise 1: Navigation Application for Commuters Design a user-friendly navigation application to assist commuters traveling between their home and Bahria University. The application must utilize a doubly linked list data structure to store the sequence of directions for the route. Users should be able to add new route steps, delete the entire route, and seamlessly navigate between home and university. Clear and concise navigation instructions, including turning directions and approximate distances, must be provided for each route step. Also show the reverse the route to navigate from Bahria University back to the user's home. Exercise 2 : Web Browser Consider a web browser that keeps track of the pages a user visits in a session using a doubly linked list. Each node in the list represents a web page and contains the URL of the page, the title of the page, and pointers to the previous and next pages in the history. Write a program that implements the above scenario with the following functionalities i. Insert the web page at the end of the double link list. ii. Display all pages in backward and forward directions. iii. Delete the web page from any position.

Lab 8: Implementation of Doubly Linked List CLO2, PLO4, P

Implement the functions of Doubly Linked List

  • Insertion
  • Deletion
  • Traversing
  • Search

Semester 03 Exercise 3: Music Playlist Application Sara is passionate about music and enjoys listening to music during her free time. Over the years, she has amassed a vast collection of music albums comprising her favorite songs. Now, she desires to organize her favorite songs into a new playlist named "My Hit Collection". Each song in her playlist is characterized by its Song ID, song name, singer's name, and the year the song was released. Your task is to develop a C++ program that helps Sara manage her music playlist using a doubly linked list. The program should incorporate the following functionalities:

  1. .Adding New Songs : Sara should be able to add new songs to her playlist. Each new song will be appended to the end of the playlist.
  2. Playing Playlist: The program should enable Sara to play her playlist in both forward and backward directions, allowing her to enjoy her favorite songs in the sequence they were added or in reverse order.
  3. Circular Playback: Sara should have the option to play her playlist in a circular fashion, ensuring a seamless listening experience without interruption.
  4. .Searching by Year: The program should provide functionality for Sara to search for songs based on the year of release. Upon searching, the program should display all songs released in the specified year.
  5. .Deleting from the Beginning: Sara should be able to remove songs from the beginning of the playlist, enabling her to manage her playlist dynamically. Your program should efficiently implement these functionalities to cater to Sara's needs and enhance her music listening experience.