Kotlin-Algorithms-and-Design-Patterns icon indicating copy to clipboard operation
Kotlin-Algorithms-and-Design-Patterns copied to clipboard

This repository contains the most common algorithms and data structures written in the Kotlin language with simple and concise code.

Алгоритмы на Kotlin

Kotlin Algorithms and Design Patterns

This repository lists the most common algorithms, data structures, and design patterns written in the Kotlin programming language.

All code is divided into separate packages:

  1. sorting - sorting algorithms
  2. search - search algorithms
  3. structures - data structure (lists, arrays, stack, queue, binary trees, e.t.c)
  4. design-patterns - design patterns
  5. other - other algorithms (Levenshtein distance, Knut Morris Pratt algorithm, e.t.c)

For each code file, tests are made, which are located in the test/kotlin directory

Also, whenever possible, I add javadoc for each class, method, and file

Content:

  1. package design_patterns - design patterns

    • Builder
    • Visitor
    • Command
    • Decorator
    • Facade
    • Abstract Factory
    • Factory Method
    • Fluent Interface
    • Monostate
    • Singleton
    • Strategy
    • Observer
    • Dependency Injection
    • Adapter
  2. package structures - data structure

    • Binary tree
    • Stack
    • Queue
    • Graph
    • Dynamic array
    • Linked list
    • Min-heap
    • Max-heap
  3. package sorting - sorting algorithms

    • Bubble sort
    • Bubble sort (improved)
    • Insertion sort
    • Merge sort
    • Quick sort
    • Selection sort
    • Radix sort
    • Tim sort
    • Count sort
  4. package search - search algorithms

    • Binary search
    • Binary search (recursive)
    • Linear search
  5. package other - other algorithms

    • Factorial
    • Knut Morris Pratt's Algorithm for finding a substring
    • Levenshtein distance
    • Palindrome
    • Euclid's algorithm
    • FizzBuzz
    • Reverse Array
    • Sieve of Eratosthenes
    • Finding the minimum
    • Finding the maximum
    • The square root of a number

Your wishes and ideas

If you are interested in my repository or you have ideas on how to improve it or add something, then let me know in telegram: