{"id":18822888,"url":"https://github.com/salma-mamdoh/data-structures-implementation","last_synced_at":"2026-02-08T14:32:24.502Z","repository":{"id":178205146,"uuid":"631384648","full_name":"Salma-Mamdoh/Data-Structures-Implementation","owner":"Salma-Mamdoh","description":"Our project for Data Structures Course taken during fall 2023 semester","archived":false,"fork":false,"pushed_at":"2024-08-02T20:42:42.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-29T16:37:47.685Z","etag":null,"topics":["circular-linked-list","cpp","data-structures","doubly-linked-list","problem-solving","queue","single-linked-list","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/Salma-Mamdoh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-22T21:20:32.000Z","updated_at":"2024-08-02T20:42:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f38dee9-b103-4384-b99c-0247f9f8b8bd","html_url":"https://github.com/Salma-Mamdoh/Data-Structures-Implementation","commit_stats":null,"previous_names":["salma-mamdoh/data-structures-implementation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Salma-Mamdoh/Data-Structures-Implementation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salma-Mamdoh%2FData-Structures-Implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salma-Mamdoh%2FData-Structures-Implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salma-Mamdoh%2FData-Structures-Implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salma-Mamdoh%2FData-Structures-Implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Salma-Mamdoh","download_url":"https://codeload.github.com/Salma-Mamdoh/Data-Structures-Implementation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salma-Mamdoh%2FData-Structures-Implementation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29233192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["circular-linked-list","cpp","data-structures","doubly-linked-list","problem-solving","queue","single-linked-list","stack"],"created_at":"2024-11-08T00:51:58.645Z","updated_at":"2026-02-08T14:32:24.483Z","avatar_url":"https://github.com/Salma-Mamdoh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Structures Implementation\n\n\u003cp\u003eThis project contains implementations of various data structures in C++, including:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003eArray-Based List\u003c/li\u003e\n  \u003cli\u003eSingle Linked List\u003c/li\u003e\n  \u003cli\u003eDoubly Linked List\u003c/li\u003e\n  \u003cli\u003eCircular Linked List\u003c/li\u003e\n  \u003cli\u003eStack\u003c/li\u003e\n  \u003cli\u003eQueue\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eEach data structure has its own set of methods that can be used to interact with the structure. Additionally, there are several problems included that can be solved using these data structures.\u003c/p\u003e\n\n\u003ch2\u003eArray-Based List\u003c/h2\u003e\n\n\u003cp\u003eThe Array-Based List implementation includes the following methods:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003einsert(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAt(elementType element, int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eretrieveAt(int index): elementType\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAt(int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ereplaceAt(elementType newElement, int index)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisItemAtEqual(elementType element, int index): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisEmpty(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisFull(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003elistSize(): int\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003emaxListSize(): int\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eclear(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eprint(): void\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eSingle Linked List\u003c/h2\u003e\n\n\u003cp\u003eThe Single Linked List implementation includes the following methods:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003einsertAtHead(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAtTail(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAt(elementType element, int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAtHead(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAtTail(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAt(int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eretrieveAt(int index): elementType\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ereplaceAt(elementType newElement, int index)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisExist(elementType element): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisItemAtEqual(elementType element, int index): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eswap(int firstItemIdx, int secondItemIdx): void\u003c/code\u003e (swap two nodes without swapping data)\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisEmpty(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003elinkedListSize(): int\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eclear(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eprint(): void\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eDoubly Linked List\u003c/h2\u003e\n\n\u003cp\u003eThe Doubly Linked List implementation includes the following methods:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003einsertAtHead(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAtTail(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAt(elementType element, int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAfter(* prev_node, int data): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAtHead(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAtTail(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAt(int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eretrieveAt(int index): elementType\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ereplaceAt(elementType newElement, int index)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisExist(elementType element): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisItemAtEqual(elementType element, int index): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eswap(int firstItemIdx, int secondItemIdx): void\u003c/code\u003e (swap two nodes without swapping data)\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ereverse(): void\u003c/code\u003e (reverse the data in the double linked list)\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisEmpty(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003edoubleLinkedListSize(): int\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eclear(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eforwardTraversal(): void\u003c/code\u003e (Print from head to tail)\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ebackwardTraversal(): void\u003c/code\u003e (Print from tail to head)\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eCircular Linked List\u003c/h2\u003e\n\n\u003cp\u003eThe Circular Linked List implementation includes the following methods:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003einsertAtHead(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAtEnd(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003einsertAt(elementType element, int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAtHead(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAtEnd(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eremoveAt(int index): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eretrieveAt(int index): elementType\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ereplaceAt(elementType newElement, int index)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisExist(elementType element): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisItemAtEqual(elementType element, int index): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eswap(int firstItemIdx, int secondItemIdx): void\u003c/code\u003e (swap two nodes without swapping data)\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisEmpty(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ecircularLinkedListSize(): int\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eclear(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eprint(): void\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eStack\u003c/h2\u003e\n\n\u003cp\u003eThe Stack implementation includes the following methods:\u003c/p\u003e\n\n\u003cul\u003e\n \u003cli\u003e\u003ccode\u003epush(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003epop(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003etop(): elementType\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisEmpty(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisFull(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003estackSize(): int\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eQueue\u003c/h2\u003e\n\n\u003cp\u003eThe Queue implementation includes the following methods:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003eenqueue(elementType element): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003edequeue(): void\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003efront(): elementType\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisEmpty(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eisFull(): bool\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003equeueSize(): int\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eProblems\u003c/h2\u003e\n\n\u003cp\u003eThis project includes several problems that can be solved using the implemented data structures. These problems are:\u003c/p\u003e\n\n\u003ch2\u003eLinked List Problems\u003c/h2\u003e\n\n\u003ch3\u003eProblem 1: Combine Nodes Between Zeros\u003c/h3\u003e\n\n\u003cp\u003eGiven a linked list containing a sequence of integers separated by 0s, merge all nodes between any two consecutive 0s into a single node whose value is the total of all the merged nodes. There are no two consecutive nodes with value == 0. There should be no 0s in the new list.\u003c/p\u003e\n\n\u003ch3\u003eProblem 2: Merge K Sorted Linked Lists\u003c/h3\u003e\n\n\u003cp\u003eGiven k linked-lists, each linked-list is sorted in ascending order, merge all the linked-lists into one sorted linked-list.\u003c/p\u003e\n\n\u003ch2\u003eStack Problems\u003c/h2\u003e\n\n\u003ch3\u003eProblem 1: Convert the Infix Expression to Postfix Expression\u003c/h3\u003e\n\n\u003cp\u003eGiven a string representing an infix expression, convert it to postfix expression.\u003c/p\u003e\n\n\u003ch3\u003eProblem 2: Longest Valid Parentheses\u003c/h3\u003e\n\n\u003cp\u003eGiven a string containing the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.\u003c/p\u003e\n\n\u003ch2\u003eQueue Problems\u003c/h2\u003e\n\n\u003ch3\u003eProblem 1: Generate Binary Numbers from 1 to N\u003c/h3\u003e\n\n\u003cp\u003eWrite a function that generates and prints all binary integers from 1 to N.\u003c/p\u003e\n\n\u003ch3\u003eProblem 2: Implement a Stack\u003c/h3\u003e\n\n\u003cp\u003eImplement a stack that supports push and pop operations using the enqueue and dequeue operations of the queue. You can use one or more queues.\u003c/p\u003e\n\n\u003ch3\u003eProblem 3: Sorting a Queue\u003c/h3\u003e\n\n\u003cp\u003eGiven a queue with random integer elements, sort it.\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalma-mamdoh%2Fdata-structures-implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalma-mamdoh%2Fdata-structures-implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalma-mamdoh%2Fdata-structures-implementation/lists"}