{"id":20296478,"url":"https://github.com/mehrajlatifli/datastructuresandalgorithmsincsharp","last_synced_at":"2026-05-29T01:31:56.459Z","repository":{"id":214711330,"uuid":"732227718","full_name":"MehrajLatifli/DataStructuresAndAlgorithmsInCSharp","owner":"MehrajLatifli","description":"Examples of Data Structures and Algorithms in C Sharp","archived":false,"fork":false,"pushed_at":"2023-12-30T06:19:18.000Z","size":133,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T05:42:29.840Z","etag":null,"topics":["abstract-data-types","algorithms-and-data-structures","array","data-structures-and-algorithms","fifo","graph","lifo","searching-algorithms","sorting-algorithms"],"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/MehrajLatifli.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-12-16T01:32:04.000Z","updated_at":"2024-01-03T17:00:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"a218ed0c-c7bc-480f-8d44-c07c3bd36cd6","html_url":"https://github.com/MehrajLatifli/DataStructuresAndAlgorithmsInCSharp","commit_stats":null,"previous_names":["mehrajlatifli/datastructuresandalgorithmsincsharp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MehrajLatifli/DataStructuresAndAlgorithmsInCSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrajLatifli%2FDataStructuresAndAlgorithmsInCSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrajLatifli%2FDataStructuresAndAlgorithmsInCSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrajLatifli%2FDataStructuresAndAlgorithmsInCSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrajLatifli%2FDataStructuresAndAlgorithmsInCSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MehrajLatifli","download_url":"https://codeload.github.com/MehrajLatifli/DataStructuresAndAlgorithmsInCSharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrajLatifli%2FDataStructuresAndAlgorithmsInCSharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["abstract-data-types","algorithms-and-data-structures","array","data-structures-and-algorithms","fifo","graph","lifo","searching-algorithms","sorting-algorithms"],"created_at":"2024-11-14T15:39:02.062Z","updated_at":"2026-05-29T01:31:56.414Z","avatar_url":"https://github.com/MehrajLatifli.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿\u003c/br\u003e\n\u003c/br\u003e\n\n\u003cimg src=\"/cover.jpg\" alt=\"Data Structures \u0026 Algorithms\"/\u003e \n\n\u003c/br\u003e\n\u003c/br\u003e\n\n```csharp\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\n﻿namespace Data\n{\n    public interface IItem\n    {\n        public int Id { get; set; }\n    }\n}\n\n\n```\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n```csharp\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Data\n{\n\n\n    public class Item : IItem, IComparable\u003cItem\u003e\n    {\n        public Item()\n        {\n\n        }\n\n        public int Id { get; set; }\n\n        public string Name { get; set; }\n\n        public override string ToString()\n        {\n            return $\" Id: {Id}, Name: {Name}  \";\n        }\n\n        public override bool Equals(object obj)\n        {\n            if (obj == null || GetType() != obj.GetType())\n                return false;\n\n            Item other = (Item)obj;\n            return Id == other.Id \u0026\u0026 string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase);\n        }\n\n        public override int GetHashCode()\n        {\n            return Id.GetHashCode() ^ (Name ?? \"\").GetHashCode(StringComparison.OrdinalIgnoreCase);\n        }\n\n        public int CompareTo(Item? other)\n        {\n            return Id.CompareTo(other.Id);\n        }\n    }\n}\n\n```\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n```csharp\n\nusing Data;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace RandomData\n{\n    public static class RandomDataFilling\n    {\n\n\n        public static async Task\u003c List\u003cItem\u003e\u003e GenerateItems(int minValue, int maxValue, int loop)\n        {\n            List\u003cItem\u003e items = new List\u003cItem\u003e();\n            List\u003cint\u003e list = new List\u003cint\u003e();\n\n            Random random = new Random();\n            for (int i = 0; i \u003c loop; i++)\n            {\n                int randomNumber = random.Next(minValue, maxValue);\n                list.Add(randomNumber);\n            }\n\n            foreach (var item in list)\n            {\n                if (list.Contains(item))\n                {\n                    items.Add(new Item { Id = item, Name = $\"Name_{Guid.NewGuid()}\" });\n                }\n            }\n\n            return items;\n        }\n\n        public static async Task\u003cint\u003e GenerateRandomId(int minValue, int maxValue)\n        {\n            Random random = new Random();\n            int randomNumber = random.Next(minValue, maxValue);\n            return randomNumber;\n        }\n\n    }\n}\n\n```\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n\u003ch2\u003e Searching 🔎 \u003c/h2\u003e\n\n\u003cul style=\"list-style-type:circle\"\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Searching%20algorithms/LinearSearch/LinearSearchAlgorithm.cs\"\u003e Linear Search \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Searching%20algorithms/BinarySearch/BinarySearchAlgorithm.cs\"\u003e Binary Search \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Searching%20algorithms/TernarySearch/TernarySearchAlgorithm.cs\"\u003eTernary Search \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Searching%20algorithms/JumpSearch/JumpSearchAlgorithm.cs\"\u003e Jump Search \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Searching%20algorithms/FibonacciSearch/FibonacciSearchAlgorithm.cs\"\u003e Fibonacci Search \u003c/a\u003e \u003c/li\u003e\n\u003c/ul\u003e\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n\u003ch2\u003e Sorting ▲▼ \u003c/h2\u003e\n\n\u003cul style=\"list-style-type:circle\"\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Sorting%20algorithms/InsertionSort/InsertionSortAlgorithm.cs\"\u003e Insertion Sort \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Sorting%20algorithms/SelectionSort/SelectionSortAlgorithm.cs\"\u003e Selection Sort \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Sorting%20algorithms/MergeSort/MergeSortAlgorithm.cs\"\u003e Merge Sort \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Sorting%20algorithms/QuickSort/QuickSortAlgorithm.cs\"\u003e Quick Sort \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Sorting%20algorithms/BubbleSort/BubbleSortAlgorithm.cs\"\u003e Bubble Sort \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Sorting%20algorithms/PancakeSort/PancakeSortAlgorithm.cs\"\u003e Pancake Sort \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Sorting%20algorithms/BucketSort/BucketSortAlgorithm.cs\"\u003e Bucket Sort \u003c/a\u003e \u003c/li\u003e\n\u003c/ul\u003e\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n\u003ch2\u003e Abstract data types ✵ \u003c/h2\u003e\n\n\u003cul style=\"list-style-type:circle\"\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Custom%20Abstract%20data%20types%20algorithms/Graph/CustomGraph.cs\"\u003e Graph \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Custom%20Abstract%20data%20types%20algorithms/Stack/CustomStack.cs\"\u003e Stack \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Custom%20Abstract%20data%20types%20algorithms/Queue/CustomQueue.cs\"\u003eQueue \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Custom%20Abstract%20data%20types%20algorithms/ArrayList/CustomArrayList.cs\"\u003e ArrayList \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Custom%20Abstract%20data%20types%20algorithms/HashSet/CustomHashSet.cs\"\u003e HashSet \u003c/a\u003e \u003c/li\u003e\n \u003cli\u003e \u003ca href=\"/Algorithms/Custom%20Abstract%20data%20types%20algorithms/LinkedList/CustomLinkedList.cs\"\u003e LinkedList \u003c/a\u003e \u003c/li\u003e\n\u003c/ul\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrajlatifli%2Fdatastructuresandalgorithmsincsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehrajlatifli%2Fdatastructuresandalgorithmsincsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrajlatifli%2Fdatastructuresandalgorithmsincsharp/lists"}