{"id":27139316,"url":"https://github.com/simran1002/algo_dev","last_synced_at":"2025-04-08T04:57:44.954Z","repository":{"id":282261291,"uuid":"947695982","full_name":"simran1002/Algo_dev","owner":"simran1002","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-13T16:23:27.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T16:39:36.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/simran1002.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":"2025-03-13T05:18:39.000Z","updated_at":"2025-03-13T16:23:31.000Z","dependencies_parsed_at":"2025-03-13T16:39:41.002Z","dependency_job_id":"a2cd28a6-8b56-4250-a7d7-e527acac8230","html_url":"https://github.com/simran1002/Algo_dev","commit_stats":null,"previous_names":["simran1002/algo_dev"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simran1002%2FAlgo_dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simran1002%2FAlgo_dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simran1002%2FAlgo_dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simran1002%2FAlgo_dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simran1002","download_url":"https://codeload.github.com/simran1002/Algo_dev/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247779703,"owners_count":20994573,"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":[],"created_at":"2025-04-08T04:57:44.444Z","updated_at":"2025-04-08T04:57:44.945Z","avatar_url":"https://github.com/simran1002.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Project Description\n\nThis project implements three fundamental algorithms via RESTful APIs:\n\n- *Binary Search* - Efficiently searches for an element in a sorted array.\n- *Quick Sort* - Sorts an array using the QuickSort algorithm.\n- *Breadth-First Search (BFS)* - Traverses a graph/tree from a given start node.\n\nEach API call is logged, storing:\n\n- *Algorithm Name*\n- *Input Data*\n- *Output Data*\n\nThis allows reusing previous results without re-executing the same request.\n\n---\n\n## 🛠 Tech Stack\n\n- *Backend:* Node.js with Express.js  \n- *Language:* TypeScript  \n- *Database (Logging):* MongoDB  \n- *Containerization :* Docker  \n\n---\n\n## API Endpoints\n\n### *Binary Search API*\n\n- *Endpoint:* POST /api/binary-search\n- *Description:* Searches for an element in a sorted array using Binary Search.\n- *Request Body:*\n\n  json\n  {\n    \"inputArr\": [1, 3, 5, 7, 9, 11],\n    \"target\": 7\n  }\n- **Response Body:**\n\n  json\n  {\n    \"result\": 0,\n    \"timeComplexity\": \"O(log n)\",\n    \"spaceComplexity\": \"O(1)\",\n    \"executionTime\": 0.007999999997991836\n  }\n\n### *Quick Sort API*\n\n- *Endpoint:* POST /api/quick-sort\n- *Description:* Sorts an array using QuickSort.\n- *Request Body:*\n\n  json\n  {\n  \"inputarr\": [9, 3, 7, 1, 6]\n  }\n\n- **Response Body:**\n\n  json\n  {\n    \"result\":[1,2,3,4,5,6,7,8,9,10],\n    \"timeComplexity\":\"O(n log n)\",\n    \"spaceComplexity\":\"O(n)\",\n    \"executionTime\":698.2417000000132\n  }\n\n### *Breadth-First Search (BFS) API*\n\n- *Endpoint:* POST /api/bfs\n- *Description:* Sorts an array using QuickSort.\n- *Request Body:*\n\n  json\n  {\n    \"graph\": {\n        \"A\": [\"B\", \"C\"],\n        \"B\": [\"A\", \"D\", \"E\"],\n        \"C\": [\"A\", \"F\"],\n        \"D\": [\"B\"],\n        \"E\": [\"B\", \"F\"],\n        \"F\": [\"C\", \"E\"]\n    },\n    \"startNode\": \"A\"\n  }\n- **Response Body:**\n\n  json\n  {\n    \"result\":[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\"],\n    \"timeComplexity\":\"O(V + E)\",\n    \"spaceComplexity\":\"O(V)\",\n    \"executionTime\":0.021700000012060627\n  }\n\n## How to Run the Project\n\n### Setup\n\n```sh\ngit clone https://github.com/simran1002/Algo_dev.git\ncd Algo_dev\nnpm install\nnpm run start","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimran1002%2Falgo_dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimran1002%2Falgo_dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimran1002%2Falgo_dev/lists"}