{"id":16132846,"url":"https://github.com/dashroshan/dsa-using-python","last_synced_at":"2025-04-06T15:16:09.279Z","repository":{"id":115286726,"uuid":"447632241","full_name":"dashroshan/dsa-using-python","owner":"dashroshan","description":"📦 Implementation of data structures and algorithms using Python","archived":false,"fork":false,"pushed_at":"2022-01-16T08:06:15.000Z","size":416,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T21:17:30.815Z","etag":null,"topics":["algorithm","data-structure","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dashroshan.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":"2022-01-13T14:34:57.000Z","updated_at":"2022-08-23T04:49:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"f045d8f0-1de8-43ab-a2a5-2da5167ab919","html_url":"https://github.com/dashroshan/dsa-using-python","commit_stats":null,"previous_names":["dashroshan/dsa-using-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashroshan%2Fdsa-using-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashroshan%2Fdsa-using-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashroshan%2Fdsa-using-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashroshan%2Fdsa-using-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashroshan","download_url":"https://codeload.github.com/dashroshan/dsa-using-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500476,"owners_count":20948880,"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":["algorithm","data-structure","python"],"created_at":"2024-10-09T22:34:47.835Z","updated_at":"2025-04-06T15:16:09.257Z","avatar_url":"https://github.com/dashroshan.png","language":"Python","readme":"# DSA using Python\n\n**[YouTube tutorial playlist](https://www.youtube.com/playlist?list=PLeo1K3hjS3uu_n_a__MI_KktGTLYopZ12)** that I followed\n\n## Big O\n\n\u003cdetails\u003e\n\u003csummary\u003eBig O analysis of some common DSA\u003c/summary\u003e\n\n![](ignore/sorting.png)\n\n![](ignore/ds2.jpg)\n\n\u003c/details\u003e\n\n## Static Arrays\n\nIt can store a fixed number of elements at subsequent memeory locations.\n\n## Dynamic Arrays\n\n**Ex : List in Python**\n\n1. Location for `N` elements is created.\n2. When elements exceed `N`, a location for `2N` elements is created and old elements copied to it.\n3. When elements exceed `2N`, a location for `3N` elements is created and old elements copied to it.\n\nand so on...\n\n## Linked List\n\n**Ex : Deque of Collections in Python**\n\nEach node (element) points to the next node (also the previous node in case of doubly linked list). Nodes do not need to be present in subsequent memory locations.\n\n## Hash Table\n\n**Ex : Dictionary in Python**\n\nUsed with key-value pairs where each key passed through a hashing algorithm gives the memory location where the value is stored.\n\nFor different keys with same hash (collision):\n\n1. Chaining : Multiple values stored in an array along with their keys in the same location.\n2. Linear Probing : Go forward until the next empty location is found, store the keys too.\n\n## Stack\n\nLast in first out (LIFO)\n\n## Queue\n\nFirst in first out (FIFO)\n\n## General Tree\n\nElements are stored in a hierarchial model where each element can have child elements and parent element.\n\n## Binary Search Tree\n\nMax 2 child elements. Element on left is less than parent. Element on right is greater than parent.\n\n## Graph\n\nIt consists of interconnected nodes with a one or two way path, and the paths may have weights. Nodes store which other nodes they're connected to any by what path weight.\n\n## Binary Search\n\nOnly works with sorted arrays\n\n1. If middle element is the item, return it.\n2. If middle element greater/less than item, continue with the sublist to the left/right accordingly.\n\n## Bubble sort\n\nGo over the array `N` times and during each pass, if the left element is greater than the right one, swap them.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashroshan%2Fdsa-using-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashroshan%2Fdsa-using-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashroshan%2Fdsa-using-python/lists"}