This repository is a collection of small Java (and a few Kotlin) exercises, examples, and algorithms. It includes language basics, data structures, problem-solving snippets, and concurrency demos. Most classes are standalone and meant to be compiled/run individually.
src/: Ad hoc Java examples (basics, arrays, IO, regex, etc.)src/com/aiokleo/problemSolving/: Algorithm practice (two-sum, LRU cache, recursion, string/array tasks)src/com/aiokleo/graph/andsrc/com/aiokleo/tree/: Graph/tree examples and traversal problemssrc/com/aiokleo/threads/: Threading, futures, executors, and race condition demonstrationssrc/com/aiokleo/annotation/andsrc/com/aiokleo/annotations/: Annotation usage and exercisessrc/com/aiokleo/*Pattern*and design/principle folders: OOP principles and design patternssrc/com/aiokleo/kotlin*and.ktfiles: Kotlin language examples
This project uses Gradle with the Java plugin. There is no single application entry point, so compile/run the class you want.
Compile a specific class:
javac src/com/aiokleo/problemSolving/twoSum/TwoSum.javaRun it (adjust the classpath and main class as needed):
java -cp src io.topic.problemSolving.twoSum.TwoSum- The repo contains compiled
.classfiles and IDE metadata in some folders; these are not required to build/run. - Many examples read from standard input or print to standard output; check each class for usage details.
- Use an IDE (IntelliJ IDEA) for browsing and running individual classes.
- Search by topic or package to locate examples relevant to a concept.
