Skip to content

SharpMind is a C# repository featuring clean implementations of fundamental data structures and algorithms.

Notifications You must be signed in to change notification settings

barni300/SharpMind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

C# Algorithms Collection πŸ—ƒοΈ

This repository contains a collection of C# algorithms implemented as standalone classes or methods.
The code is intended for learning and reference purposes.

ChainHashTable ⛓️

ChainHashTable is a simple hash table implementation in C# using separate chaining to handle collisions.
It stores key-value pairs πŸ”‘βž‘οΈπŸ“„, supports insertion, deletion, and searching, and dynamically resizes when it becomes too full.

Use Case πŸ’‘

Ideal for storing key-value data with fast lookups while handling collisions efficiently. Each bucket uses a linked list πŸ”— to store multiple entries with the same hash.

OpenAddressingHashTable πŸ·πŸ“¬

OpenAddressingHashTable uses open addressing (linear probing) to handle collisions.
Colliding entries are placed in the next available slot in the array.

Use Case πŸ’‘
Great for storing key-value data with fast lookups without using linked lists, resolving collisions by probing sequential slots.

Even Ones Subarray Checker βš–οΈ

This C# snippet checks whether a subarray of given length contains an equal number of 1s and 0s (or positives and negatives).

How It Works 🧩

  • Reads an array of integers (1s and 0s). πŸ”’
  • For each query (l, r), checks the subarray from index l to r.
  • If the subarray length is even and there are enough 1s and 0s to split evenly, it outputs 1 βœ…, otherwise 0 ❌.

Use Case πŸ’‘
Useful for competitive programming problems involving subarray parity and counting elements efficiently.

About

SharpMind is a C# repository featuring clean implementations of fundamental data structures and algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages