{"id":15358704,"url":"https://github.com/tirthasheshpatel/data-structures-and-algorithms","last_synced_at":"2025-04-15T07:21:13.559Z","repository":{"id":52832611,"uuid":"200360097","full_name":"tirthasheshpatel/Data-Structures-and-Algorithms","owner":"tirthasheshpatel","description":"Find any Algorithms and Data Structure implemented in C/C++ here!","archived":false,"fork":false,"pushed_at":"2019-12-06T03:05:19.000Z","size":39043,"stargazers_count":19,"open_issues_count":6,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T17:47:44.879Z","etag":null,"topics":["algorithms","algorithms-and-data-structures","beginner","data-structures"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tirthasheshpatel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-03T10:01:38.000Z","updated_at":"2024-11-01T15:26:15.000Z","dependencies_parsed_at":"2022-08-22T22:40:37.965Z","dependency_job_id":null,"html_url":"https://github.com/tirthasheshpatel/Data-Structures-and-Algorithms","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/tirthasheshpatel%2FData-Structures-and-Algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirthasheshpatel%2FData-Structures-and-Algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirthasheshpatel%2FData-Structures-and-Algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tirthasheshpatel%2FData-Structures-and-Algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tirthasheshpatel","download_url":"https://codeload.github.com/tirthasheshpatel/Data-Structures-and-Algorithms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249024024,"owners_count":21200010,"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","algorithms-and-data-structures","beginner","data-structures"],"created_at":"2024-10-01T12:42:17.347Z","updated_at":"2025-04-15T07:21:13.540Z","avatar_url":"https://github.com/tirthasheshpatel.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data-Structures-and-Algorithms\n\u003cp\u003eThis project is meant to help beginners understand and code Data Structures and Algorithms\nin C. This project strictly follows the book \u003cstrong\u003e`Introduction to Algorithms` by Thomas H. Cormen\u003c/strong\u003e.\nAny beginners strugling with Data Structures and Algorithms are highly recommended to follow\nthe book. Most of the code is documented properly for beginner audiences to understand easily.\nMinimum utilities and libraries are used in case the targeted audience ins't familiar with them.\u003c/p\u003e\n\u003cp\u003e\u003ch5\u003e This project is still in development stage and needs more contributors. \u003c/h5\u003e\u003c/p\u003e\n\u003cp\u003e\u003csmall\u003e Read contributing guidelines in case you want to contribute to this project.\u003c/small\u003e\u003c/p\u003e\n\n## Algorithms Implemented\n\u003cp\u003e Algorithms have been mostly implemented in C++ and partially documented. The algorithms implemented are:\n\u003col\u003e\n  \u003cli\u003eInsertion Sort. (location: Algorithms.cpp, line on:[150-165])\u003c/li\u003e\n  \u003cli\u003e Heap Sort (location: Algorithms.cpp, line no:[331-342])\u003c/li\u003e\n  \u003cli\u003e Quick Sort (location: Algorithms.cpp, line no:[368-378]) \u003c/li\u003e\n  \u003cli\u003e Randomized Quick Sort (location: Algorithms.cpp, line no:[360-366]) \u003c/li\u003e\n  \u003cli\u003e Counting Sort (location: Algorithms.cpp, line no:[392-408]) \u003c/li\u003e\n  \u003cli\u003e Merge Sort (location: Algorithms.cpp, line no:[410-467]) \u003c/li\u003e\n  \u003cli\u003e Selection Sort (location: Algorithms.cpp, line no:[484-500]) \u003c/li\u003e\n  \u003cli\u003e Bubble Sort (location: Algorithms.cpp, line no:[474-482]) \u003c/li\u003e\n  \u003cli\u003e Linear Search (location: Algorithms.cpp, line no:[133-143]) \u003c/li\u003e\n  \u003cli\u003e Binary Search (location: Algorithms.cpp, line no:[111-124]) \u003c/li\u003e\n  \u003cli\u003e Maximum Subarry Problem solved using brute forse, devide and concour and linear methods. (location: Algorithms.cpp, line no:[582-691]) \u003c/li\u003e\n  \u003cli\u003e Infix to Reverse Polish (postfix) using STACK in C (location: infix_to_postfix/main.c) \u003c/li\u003e\n  \u003cli\u003e Infix to Polish (prefix) using STACK in C (location: infix_to_prefix/main.c) \u003c/li\u003e\n  \u003cli\u003e Reverse Polish (postfix) to Polish (prefix) using STACK in C (location: postfix_to_prefix/main.c) \u003c/li\u003e\n  \u003cli\u003e Reverse Polish (postfix) to Infix using STACK in C (location: postfix_to_infix/main.c) \u003c/li\u003e\n  \u003cli\u003e Polish (prefix) to Reverse Polish (postfix) using STACK in C (location: prefix_to_postfix/main.c) \u003c/li\u003e\n  \u003cli\u003e Polish (prefix) to Infix using STACK in C (location: profix_to_infix/main.c) \u003c/li\u003e\n\u003c/ol\u003e\n\u003c/p\u003e\n\u003cp\u003e All the algorithms will be fully documented and implemented in C soon! \u003c/p\u003e\n  \n## Data Structures Implemented\n\u003cp\u003e All the Data Structures have been implemented in C. The implemented Data Structures are:\n  \u003col\u003e\n    \u003cli\u003e Stack (fully documented) (C implementation: stack_as_static_array.c, C++ implementtation: stack/stack/headers/Stack.h)\u003c/li\u003e\n    \u003cli\u003e Queue (documented) (C implementation: queue_using_static_array.c, C++ implementtation: queue/queue/headers/Queue.h)\u003c/li\u003e\n    \u003cli\u003e Heap (documented) (location: Algorithms.cpp, line no:[168-342])\u003c/li\u003e\n    \u003cli\u003e Priority Queue (documented) (C implementation: priority_queue.c, C++ implementation: Algorithms.cpp, line no:[168-342]) \u003c/li\u003e\n    \u003cli\u003e Circular Queue (undocumented) (location: circular_queue_uaing_static_array.c) \u003c/li\u003e\n    \u003cli\u003e Binary Search Trees (undocumented) (location: binary_tree.c)\u003c/li\u003e\n    \u003cli\u003e Doubly Linked List (fully documented) (location: doubly_linked_list.c)\u003c/li\u003e\n    \u003cli\u003e Direct Address Tables (undocumented) (location: direct_address_tables.c)\u003c/li\u003e\n    \u003cli\u003e Hash Tables (fully documented) (location: hash_tables.c)\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/p\u003e\n\n\u003ch1\u003e Dynamic Programming \u003c/h1\u003e\n\n\u003cp\u003e Currently under devlopment, some of the Dynamic and Greedy Algoruthms have been implemented in this section. The implementations include: \u003c/p\u003e\n\u003col\u003e \n  \u003cli\u003e Fibonacci Series \u003c/li\u003e\n  \u003cli\u003e Rod Cutting Problem \u003c/li\u003e\n  \u003cli\u003e Matrix Chain Multiplication Problem \u003c/li\u003e\n  \u003cli\u003e Longest Common Subsequence Problem \u003c/li\u003e\n\u003c/ol\u003e\n\n\u003ch3\u003eWhen does Dynamic Algorithm apply?\u003c/h3\u003e\n\u003cp\u003e\n\u003col\u003e\n\u003cli\u003e optimal substructure.\n    \u003cul\u003e\u003cli\u003eProperty of independence holds.\u003c/li\u003e\n    \u003cli\u003eProperty of linearity holds.\u003c/li\u003e\n    \u003cli\u003eChoices hold both for subproblems and problems.\u003c/li\u003e\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e overlapping subproblems.\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/p\u003e\n\n\u003ch3\u003eElements of Dynamic Programming:\u003c/h3\u003e\n\u003cp\u003e\n\u003col\u003e \n\u003cli\u003e Optimal Substucture.\u003c/li\u003e\n\u003cli\u003e Overlapping Subproblems.\u003c/li\u003e\n\u003cli\u003e Reconstructing a optimal solution.\u003c/li\u003e\n\u003cli\u003e Memoization for top-down approach.\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/p\u003e\n\n\n\u003ch3\u003eAttack plan:\u003c/h3\u003e\n\u003cp\u003e\n\u003col\u003e\n\u003cli\u003e Characterize the stucture of an optimum solution.\u003c/li\u003e\n\u003cli\u003e Recursively define the value of an optimum solution.\u003c/li\u003e\n\u003cli\u003e Compute the value of optimum solution.\u003c/li\u003e\n\u003cli\u003e Construct an optimal solution from computed information.\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/p\u003e\n\n\u003ch3\u003eExamples:\u003c/h3\u003e\n\u003cp\u003e \n\u003col\u003e\n\u003cli\u003e Rod cutting Problem.\u003c/li\u003e\n\u003cli\u003e Matrix Chain Multiplication.\u003c/li\u003e\n\u003cli\u003e Shortest Path in unweighed directed graph.\u003c/li\u003e\n\u003cli\u003e Longest Common Sub-Sequence.\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/p\u003e\n\n\n\u003ch3\u003eWhere it doesn't apply:\u003c/h3\u003e\n\u003cp\u003e\n\u003col\u003e\n\u003cli\u003e Longest Path in unweighed directed graph.\u003c/li\u003e\n\u003cli\u003e Rod cutting with limit of cuts.\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/p\u003e\n\n\n\n## Thanking you!\n\u003csmall\u003e Please read the contributing guidelines if you wish to contribute!\u003c/small\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftirthasheshpatel%2Fdata-structures-and-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftirthasheshpatel%2Fdata-structures-and-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftirthasheshpatel%2Fdata-structures-and-algorithms/lists"}