A comprehensive collection of coding practice problems, system design implementations, and Java programming concepts. This repository serves as a learning resource and reference guide for software engineering topics.
src/
├── distributedsystems/
│ └── ratelimiting/
├── multithreading/
├── leetcode/
└── java8/
Path: src/distributedsystems/ratelimiting
Implementation of various rate limiting algorithms and patterns commonly used in distributed systems.
- Token Bucket Algorithm - Classic rate limiting with burst capacity
- Leaky Bucket Algorithm - Smooth rate limiting implementation
- Fixed Window Counter - Time-based request counting
- Sliding Window Log - Precise rate limiting with request logs
- Sliding Window Counter - Memory-efficient sliding window approach
- Understanding rate limiting strategies in microservices
- Implementing throttling mechanisms for API protection
- Handling concurrent requests in distributed environments
- Performance optimization for high-throughput systems
Path: src/multithreading
Comprehensive examples and implementations of Java multithreading concepts and concurrent programming patterns.
- Thread Creation & Management - Basic thread operations
- Synchronization - synchronized blocks, locks, and monitors
- Producer-Consumer Pattern - Classic concurrency problem
- Thread Pools - ExecutorService and ThreadPoolExecutor
- Concurrent Collections - Thread-safe data structures
- Lock-Free Programming - Atomic operations and CAS
- Deadlock Prevention - Strategies and detection mechanisms
- CountDownLatch - Implement barrier.
- Uber seating problem - Implemented using cyclic barrier, semaphore & Reentrant lock
- Multithreaded Merge sort -- Implemented multi threaded merge sort - each thread for each recursive sub problem.
- Mastering Java concurrency utilities
- Understanding thread safety and synchronization
- Implementing efficient parallel algorithms
- Debugging and troubleshooting concurrent applications
Path: src/leetcode
Solutions to LeetCode problems organized by difficulty and topic, with detailed explanations and multiple approaches.
- Arrays & Strings - Fundamental data structure problems
- Linked Lists - Pointer manipulation and traversal
- Trees & Graphs - Hierarchical and network data structures
- Dynamic Programming - Optimization and memoization
- Sorting & Searching - Algorithm design and analysis
- Hash Tables - Efficient lookup and mapping
- Two Pointers - Efficient array/string processing
- Sliding Window - Substring and subarray problems
Each solution includes:
- Problem statement and constraints
- Multiple solution approaches (when applicable)
- Time and space complexity analysis
- Detailed code comments and explanations
- Test cases and edge case handling
Path: src/java8
Practical examples and implementations of Java 8 features with real-world use cases.
- Lambda Expressions - Functional programming in Java
- Stream API - Declarative data processing
- Optional Class - Null safety and better error handling
- Method References - Cleaner functional code
- Default Methods - Interface evolution
- Date/Time API - Modern temporal handling
- Collectors - Advanced stream operations
- Parallel Streams - Concurrent data processing
- Writing more concise and readable code
- Leveraging functional programming paradigms
- Improving performance with parallel processing
- Modern Java development best practices
- Java 8 or higher
- IDE (IntelliJ IDEA, Eclipse, or VS Code)
- Basic understanding of Java programming
-
Clone the repository:
git clone https://github.com/saipavanbhanu/CodingPractice.git
-
Navigate to the project directory:
cd CodingPractice -
Compile and run specific examples:
javac src/path/to/YourClass.java java -cp src path.to.YourClass
- Start with Java 8 Features to understand modern Java syntax
- Move to Multithreading for concurrent programming concepts
- Practice with LeetCode problems to strengthen algorithmic thinking
- Explore Distributed Systems for scalable architecture patterns
- Deep dive into Distributed Systems implementations
- Study Multithreading patterns for performance optimization
- Challenge yourself with LeetCode hard problems
- Apply Java 8 Features in real-world scenarios
Contributions are welcome! Please feel free to:
- Add new problem solutions
- Improve existing implementations
- Fix bugs or optimize code
- Add documentation and examples
- Fork the repository
- Create a feature branch
- Write clean, well-documented code
- Include test cases where applicable
- Submit a pull request with a clear description
- Java Documentation
- LeetCode Platform
- Java Concurrency in Practice
- Designing Data-Intensive Applications
This project is open source and available under the MIT License.
Sai Pavan Bhanu
- GitHub: @saipavanbhanu
⭐ Star this repository if you find it helpful!
Happy Coding! 🚀