{"id":26929443,"url":"https://github.com/parth1899/daa-course-programs","last_synced_at":"2025-04-02T05:27:07.874Z","repository":{"id":285610717,"uuid":"937889855","full_name":"parth1899/DAA-Course-Programs","owner":"parth1899","description":"Implementations of algorithmic problems taught in the Design and Analysis of Algorithms course curriculum","archived":false,"fork":false,"pushed_at":"2025-04-01T17:25:14.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T18:33:13.384Z","etag":null,"topics":[],"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/parth1899.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-02-24T04:33:14.000Z","updated_at":"2025-04-01T17:25:17.000Z","dependencies_parsed_at":"2025-04-01T18:39:00.681Z","dependency_job_id":"b13413c6-a01d-4a80-92fb-f2362de552e1","html_url":"https://github.com/parth1899/DAA-Course-Programs","commit_stats":null,"previous_names":["parth1899/daa-course-programs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FDAA-Course-Programs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FDAA-Course-Programs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FDAA-Course-Programs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parth1899%2FDAA-Course-Programs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parth1899","download_url":"https://codeload.github.com/parth1899/DAA-Course-Programs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246761692,"owners_count":20829504,"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-02T05:27:07.317Z","updated_at":"2025-04-02T05:27:07.865Z","avatar_url":"https://github.com/parth1899.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Design and Analysis of Algorithms (DAA) Assignments**  \n\nThis repository contains implementations of various algorithms taught in the **Design and Analysis of Algorithms (DAA)** course. The assignments cover a range of fundamental algorithmic problems, including sorting, searching, combinatorial problems, and majority element detection.  \n\n## **Assignments Overview**  \n\n### **Assignment 1: Derangements \u0026 Maximum Updates**  \n1. **Number of Derangements** – Counting valid permutations where no element appears in its original position.  \n2. **Max Updates in Unsorted Array** – Finding the average number of updates required to track the maximum element for all possible `n!` arrays.  \n\n### **Assignment 2: Sorting Algorithms**  \n1. **Quick Sort** – A divide-and-conquer sorting algorithm with an average time complexity of `O(n log n)`.  \n2. **K-Way Merge Sort** – A variation of merge sort that merges `k` sorted sequences efficiently.  \n\n### **Assignment 3: Josephus Problem**  \n1. **Array-Based Solution** – Simulates the elimination process using an array.  \n2. **Circular Linked List-Based Solution** – Implements an efficient approach using a circular linked list.  \n\n### **Assignment 4: Fast Modular Exponentiation**  \n1. **Brute Force Approach** – Computes exponentiation using straightforward multiplication.  \n2. **Recursive Approach** – Uses divide-and-conquer for efficient modular exponentiation.  \n\n### **Assignment 5: Majority Element Search**  \nA number is a **majority element** if it appears more than `n/2` times in an array. Implementations include:  \n1. **Brute Force** – Counts occurrences for each element.  \n2. **Sorting-Based Approach** – Uses sorting to locate the majority element.  \n3. **Boyer-Moore Majority Voting Algorithm** – A space-efficient algorithm to find the majority element in `O(n)` time.  \n\n### **Assignment 6: Patience Sorting**  \n1. **Patience Sorting Algorithm** – Used to find the longest increasing subsequence in `O(n log n)`.  \n\n### **Assignment 7: Kadane's Algorithm for Maximum Contiguous Block Sum**  \n1. **Brute Force Approach** – Checks all subarrays to find the maximum sum.  \n2. **Optimized Brute Force** – Reduces redundant calculations for better performance.  \n3. **Kadane's Algorithm** – An efficient `O(n)` approach to find the maximum sum of a contiguous subarray.  \n\n### **Assignment 8: Kruskal's Algorithm for Minimum Spanning Tree (MST)**  \n1. **Kruskal's Algorithm** – A greedy algorithm to find the MST of a graph using the Union-Find data structure.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparth1899%2Fdaa-course-programs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparth1899%2Fdaa-course-programs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparth1899%2Fdaa-course-programs/lists"}