Skip to content

optimusam/csharp-data-structures-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures and Algorithms in C#

This repo is to implement data structures and common useful algorithms in C#. It started out as my journey to learn C# as a Java dev and I thought it might help someone in a similar position as me.

All the code written is tested with xUnit and .NET 7. I have tried to follow a TDD design. Generics have been used to provide support for most types.

Data Structures

The following have been implemented.

  • Linked List
    • Add element to head.
    • Add element to tail.
    • Remove element from head.
    • Remove element from tail.
  • Trees
    • Traversals - Preorder, Inorder, Postorder, Level-order
  • Graphs
    • Graph creation.
    • Traversals - Depth-first search (DFS). Breadth-First search (BFS).
  • Set
    • HashSet with collision handling using chaining technique.
  • Map
    • HashMap with collision handling using chaining technique.

Algorithms

The following have been implemented.

  • Sorting
    • Bubble Sort
    • Merge Sort
    • Quick Sort (Randomized)
    • Insertion Sort
    • Selection Sort

About

Data Structures & Algorithms implemented in C#

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages