A comprehensive collection of data structures and algorithms implementations and solutions written in Kotlin. This repository contains solutions to coding interview problems from various platforms including LeetCode and HackerRank, organized by topic and difficulty.
This project serves as a learning resource and reference guide for data structures and algorithms concepts using Kotlin. It includes:
- Algorithm implementations with detailed explanations
- Coding interview problem solutions from popular platforms
- Educational notes and documentation for key concepts
- Well-organized structure by topic and problem source
src/main/kotlin/
βββ Main.kt # Application entry point
βββ array/ # Array data structure and algorithms
β βββ ARRAY.md # Comprehensive array concepts guide
β βββ leetcode/ # LeetCode array problems
βββ hackerrank/ # HackerRank problem solutions
β βββ arrays/ # Array problems
β βββ dictionariesandhashmaps/ # Hash table problems
β βββ gettingstarted/ # Beginner problems
β βββ sorting/ # Sorting algorithms
β βββ stringmanipulation/ # String problems
β βββ warmup/ # Warm-up problems
βββ leetcode/ # LeetCode problem solutions
βββ arrays/ # Array problems
βββ hashmapset/ # HashMap and HashSet problems
βββ prefixsum/ # Prefix sum technique
βββ slidingwindow/ # Sliding window technique
βββ twopointers/ # Two pointers technique
- Arrays - Operations, techniques, and common patterns
- Hash Tables - HashMaps, HashSets, and applications
- Strings - Manipulation and pattern matching
- Sorting - Various sorting algorithms and applications
- Two Pointers - Efficient array/string traversal
- Sliding Window - Subarray/substring optimization
- Prefix Sum - Efficient range sum queries
- Binary Search - Search in sorted arrays
- LeetCode - Popular coding interview problems
- HackerRank - Programming challenges and contests
- JDK 8 or higher
- Gradle (included via Gradle Wrapper)
-
Clone the repository:
git clone https://github.com/erenalpaslan/data-structures-and-algorithm-kotlin.git cd data-structures-and-algorithm-kotlin
-
Build the project:
./gradlew build
-
Run the application:
./gradlew run
./gradlew test
Each topic includes:
- Theoretical explanations with time/space complexity analysis
- Code implementations with detailed comments
- Example problems and their solutions
- Common patterns and techniques
For detailed array concepts and techniques, see ARRAY.md.
- Kotlin 1.9.24 - Primary programming language
- Gradle - Build automation and dependency management
- JUnit - Unit testing framework
Contributions are welcome! Please feel free to submit pull requests or open issues for:
- Bug fixes
- New algorithm implementations
- Additional problem solutions
- Documentation improvements
This project is designed for educational purposes and coding interview preparation. Each solution includes:
- Time and space complexity analysis
- Multiple approaches where applicable
- Edge case handling
- Clean, readable code with comments
This project is open source and available under the MIT License.
Happy Coding! π