Welcome to the Concurrency Playground repository! 🚀 This collection of Golang projects explores various aspects of concurrent programming, offering hands-on examples and implementations.
- Bounded Blocking Queue
- A thread-safe, bounded blocking queue implementation for managing tasks in a concurrent environment. (Difficulty: Medium)
- Leetcode Challenge
- Rides
- Simulates a scenario where Democrats and Republicans order Uber rides, considering specific conditions to prevent conflicts. (Difficulty: Hard)
- BuildingH2O
- Demonstrates concurrent molecule creation using Go routines and synchronization primitives, simulating the formation of water molecules (H2O). (Difficulty: Medium)
- Leetcode Challenge
- Dining Philosophers
- Implements the classic Dining Philosophers problem using Go concurrency features, exploring synchronization techniques for resource sharing. (Difficulty: Medium)
- Leetcode Challenge
- FizzBuzz
- Implements the classic FizzBuzz problem concurrently, printing numbers divisible by 3 as "Fizz", divisible by 5 as "Buzz", and divisible by both as "FizzBuzz". (Difficulty: Easy)
- Leetcode Challenge
- FooBar
- Implements a concurrent solution to the FooBar problem, where two goroutines take turns printing "Foo" and "Bar" in a specific order. (Difficulty: Easy)
- Leetcode Challenge
- PrintOrder
- Demonstrates synchronization techniques using goroutines and channels to ensure a specific order of printing messages from multiple concurrent routines.(Difficulty: Medium)
- Leetcode Challenge
- RateLimiter
- Provides a thread-safe implementation for rate limiting functions based on leaky bucket algorithm, allowing control over the number of allowed calls within a defined time window. (Difficulty: Easy)
- ReaderWriter
- Offers a package for managing concurrent read and write access to shared data using read-write locks and optional channels for synchronization. (Difficulty: Medium)
- SafeMap
- Implements a thread-safe map structure that allows concurrent access and modification of key-value pairs without data races. (Difficulty: Medium)
- ScheduleTasks
- Demonstrates scheduling tasks for execution at specific times or intervals using concurrency primitives like timers or goroutines. (Difficulty: Medium)
go get -u github.com/vasusheoran/concurrency@latest
Navigate to individual sub-projects to explore their README files and code.
Feel free to contribute, report issues, or suggest improvements. Your insights and ideas are highly appreciated.
This repository is licensed under the MIT License.