{"id":22763125,"url":"https://github.com/harshbatra/music_player_using_ll","last_synced_at":"2025-09-01T20:33:55.112Z","repository":{"id":57981898,"uuid":"529494883","full_name":"HarshBatra/Music_Player_using_LL","owner":"HarshBatra","description":"MUSIC PLAYER SYSTEM USING LINKED LISTS : Academic Project under Data Structures \u0026 Algorithms course","archived":false,"fork":false,"pushed_at":"2022-08-27T06:19:59.000Z","size":380,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T11:44:30.351Z","etag":null,"topics":["algorithms","cpp","data-structures","double-linked-list","doubly-linked-list","linked-list","music-player","optimization","queue","stack"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HarshBatra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-27T05:46:23.000Z","updated_at":"2024-11-10T02:55:54.000Z","dependencies_parsed_at":"2022-08-29T14:30:47.201Z","dependency_job_id":null,"html_url":"https://github.com/HarshBatra/Music_Player_using_LL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshBatra%2FMusic_Player_using_LL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshBatra%2FMusic_Player_using_LL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshBatra%2FMusic_Player_using_LL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshBatra%2FMusic_Player_using_LL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HarshBatra","download_url":"https://codeload.github.com/HarshBatra/Music_Player_using_LL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301965,"owners_count":20755512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","cpp","data-structures","double-linked-list","doubly-linked-list","linked-list","music-player","optimization","queue","stack"],"created_at":"2024-12-11T11:07:12.549Z","updated_at":"2025-03-30T09:41:20.017Z","avatar_url":"https://github.com/HarshBatra.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Music_Player_using_LL\nAcademic Project under Data Structures and Algorithms course\n\n![image](https://user-images.githubusercontent.com/67479922/187017338-8fa27591-37db-4c0c-8c7e-33dbdd59502f.png)\n\n\nAs part of my CO252 project, I created a Music Player system using the Data Structures and Algorithms: mainly Doubly Linked List, stacks, and queues on C++. This music player can also be used to read and create song items from files. I have also optimized the program by using \"itemCount\" variable by updating it each and every time a song is added or deleted from the playlist, which removes the need for counting items in linked list (which we all know takes O(n) time), so it improves the time complexity of that function from O(n) to O(1). While it may be more annoying in the short term to update the item count value depending on the operation, there is a performance bonus from doing this. The major part of the challenge included making a doubly linked list that would accept string data and store it efficiently. Involving the usage of file handling was another challenge, to retrieve songs from a pre-made list and adding it to the linked list (current playlist). It also enabled me to write the new input songs to the file. All changes in the list were reflected on the \"playlist.txt\" file (automatically created while running the program).\n\nProgramming Language used: C++\n\nData Structures used: Linked Lists, Stacks, and Queues\n\n![image](https://user-images.githubusercontent.com/67479922/187017381-2f3fd79f-7c2d-4764-8517-eae4fb8c4148.png)\n\nPROJECT METHODOLOGY / FLOW OF EVENTS:\n\n![MusicPlayerLL_Flowchart](https://user-images.githubusercontent.com/67479922/187017509-ab0a108c-fb56-4cc1-81e9-b118198e9856.jpg)\n\nDIFFERENT FUNCTIONS USED:\n\n1. tofile() –\nFunction to work on playslist.txt.\n2. add_node() –\nFunction that adds songs to the list using a linked list.\n3. add_node_file() –\nFunction that adds songs to the playlist to linked list from the data passed in addplaylist()\nfunction.\n4. delete_file() –\nFunction to delete song from text file playlist.txt.\n5. del_node() –\nFunction that deletes the last song from the input linked list.\n6. printlist() –\nFunction that displays the input songs of the playlist.\n7. count_nodes() –\nFunction that tracks the number of inputs in the linked list.\n8. del_pos() –\nFunction that deletes songs from the linked list using the position of that song.\n9. search1() –\nFunction that takes song input and linearly searches through the linked list and finds matching\ncase.\n10. push() –\nFunction that pushes the last played track of play() function into a stack to store and create a\nrecently played list.\n11. display() -\nFunction to display the stack generated in push() function.\n12. play() -\nFunction to search input song and show if it can be played. It then passes the song to push()\nfunction to be added to recently played list.\n13. recent() -\nFunction that calls display() function.\n14. topelement() –\nFunction that displays the last played song.\n15. addplaylist() –\nFunction that opens text file playlist.txt and passes data to add_node_file() function.\n16. del_search() –\nFunction to search input song and delete it from the list.\n17. deletemenu() –\nFunction to invoke del_search() or del_pos() functions depending on user input.\n18. main() –\nFunction that invokes all other functions of the project based on user defined input.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshbatra%2Fmusic_player_using_ll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshbatra%2Fmusic_player_using_ll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshbatra%2Fmusic_player_using_ll/lists"}