Kotlin Algorithms and Design Patterns

Last update: May 22, 2022

Алгоритмы на 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

  2. package structures - data structure

  3. package sorting - sorting algorithms

  4. package search - search algorithms

  5. package other - other algorithms

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:

GitHub

https://github.com/evitwilly/Kotlin-Algorithms-and-Design-Patterns
You might also like...

AbstractFactoryDesignPatternWithKotlin - Abstract Factory Design Pattern With Kotlin

AbstractFactoryDesignPatternWithKotlin - Abstract Factory Design Pattern With Kotlin

AbstractFactoryDesignPatternWithKotlin Abstract Factory Design Pattern With Kotl

Jan 2, 2022

Kotlin extension function provides a facility to "add" methods to class without inheriting a class or using any type of design pattern

What is Kotlin Extension Function ? Kotlin extension function provides a facility to "add" methods to class without inheriting a class or using any ty

Apr 19, 2022

A simple demo project based on MVVM clean architecture and material design & animations.

A simple demo project based on MVVM clean architecture and material design & animations.

GithubFollows A simple demo project based on MVVM clean architecture and material design & animations. Architecture Specs & Open-source libraries Mini

May 15, 2022

New style for app design Online Sunglasses Shop App UI made in Jetpack Compose.😉😎

New style for app design Online Sunglasses Shop App UI made in Jetpack Compose.😉😎

JetSunglassUI-Android New style for app design Online Sunglasses Shop App UI made in Jetpack Compose. 😉 😎 (Navigation Components, Dagger-Hilt, Mater

Apr 13, 2022

Sushi Design System - UI Kit for Android apps

Sushi Design System - UI Kit for Android apps

Sushi Design System ⚡️ Android UI Kit ⚡️ Application is available here: Latest release: Usage The master branch is being used for release and dev is t

Mar 28, 2022

Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP)

Mockative Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP). Installation Mockative uses KSP to generate

May 18, 2022

Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to "Go" actually "Kotlin" :-)

Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to

Microservices Kotlin gRPC Deployed in EC2, Check it out! This repo contains microservices written in Kotlin with BFF pattern for performing CRUD opera

Apr 21, 2022

Repo: Programming problems with solutions in Kotlin to help avid Kotlin learners to get a strong hold on Kotlin programming.

Kotlin_practice_problems Repo: Programming problems with solutions in Kotlin to help avid Kotlin learners to get a strong hold on Kotlin programming.

Oct 14, 2021

Kotlin-oop - Repositório criado para ser utilizado pelo projeto de Kotlin OOP desenvolvido em Kotlin nas aulas feitas através da plataforma Alura.

Projeto React OOP Repositório criado para ser utilizado pelo projeto de Kotlin OOP desenvolvido em Kotlin nas aulas feitas através da plataforma Alura

Jan 5, 2022
Comments
  • 1. Naive factorial implementation

    The current implementation of factorial has two problems:

    1. It demonstrates literally nothing except the factorial's definition. To be meaningful it should contain some optimizations like prime factorization.
    2. It uses Int, hence it is correct only in [ 0 .. 12 ] range. image Even using ULong will allow values only from 0 to 20 inclusively, so only long arithmetic can have any practical value because for standard integer types the optimal algorithm is just to access array:
    val factorials: ULongArray = ulongArrayOf(1uL, 1uL, 2uL ...)
    
    Reviewed by CommanderTvis at 2022-01-30 17:06
  • 2. Palindrome algorithm

    https://github.com/KiberneticWorm/Kotlin-Algorithms-and-Design-Patterns/blob/master/src/main/kotlin/other/Palindrome.kt I don't think this is an algorithm.

    Reviewed by yamin8000 at 2022-02-03 03:11
  • 3. observers must be declared as set

    private val observers = mutableListOf() // in this line use of mutableSetOf is needed

    override fun observe(observer: Observer) { observers.add(observer)//'cause you can add same observer many times }

    Reviewed by RubberBigPepper at 2022-01-30 07:55
  • 4. sortAlgo -> sortInPlace

    https://github.com/KiberneticWorm/Kotlin-Algorithms-and-Design-Patterns/blob/b96f19350f2d70a159eb3310acd31697a73d0ac9/src/main/kotlin/en/sorting/SortAlgo.kt#L10

    it would be be better to call it sortInPlace.

    Reviewed by altavir at 2022-01-28 07:00
Algorithms and data structures in Kotlin.
Algorithms and data structures in Kotlin.

Here you can find the most common algorithms and data structures written in Kotlin. The goal of this project is to create the most eloquent implementa

May 18, 2022
This repo contains my solutions to some data structures and algorithms problems on leetcode.

DSA Playground This repository contains solutions to dsa problems in kotlin. NOTE: This file will get long, please consider using <Ctrl>F DSA With Kun

Dec 9, 2021
Bring together all of the remarkable Computer Graphics Algorithms in one place 🚀
Bring together all of the remarkable Computer Graphics Algorithms in one place 🚀

Compose Computer Graphics Playground ?? "There was an idea to bring together all of the remarkable Computer Graphics Algorithms in one place. And keep

May 17, 2022
Kotlin Example of how to organize your code using MVC and some patterns seen in class
Kotlin Example of how to organize your code using MVC and some patterns seen in class

Kotlin Example of how to organize your code using MVC and some patterns seen in class

Mar 23, 2022
A project to learn about Reactive Microservices experimenting with architectures and patterns
A project to learn about Reactive Microservices experimenting with architectures and patterns

reactive-microservices-workshop Copyright © 2021 Aleix Morgadas - Licenced under CC BY-SA 4.0 A project to learn about Reactive Microservices experime

Feb 21, 2022
TheMovies 🎬 A demo project for The Movie DB based on Kotlin MVVM architecture and material design & animations.
TheMovies 🎬 A demo project for The Movie DB based on Kotlin MVVM architecture and material design & animations.

A simple project for The Movie DB based on Kotlin MVVM clean architecture and material design & animations. How to build on your environment

May 6, 2022
Spring Boot Example with Kotlin and Domain Driven Design

Spring Boot Kotlin Domain Driven Design Example Just an example project where ddd is implemented with some other great patterns and architecture from

May 6, 2022
DesignLogin-Register - Design Login and Register With Kotlin

Diseños de Login en XML En esta ocasión vengo a presentar diseños de inicio de s

Apr 21, 2022
Demonstration of Object Pool Design Pattern using Kotlin language and Coroutine
Demonstration of Object Pool Design Pattern using Kotlin language and Coroutine

Object Pool Design Pattern with Kotlin Demonstration of Thread Safe Object Pool Design Pattern using Kotlin language and Coroutine. Abstract The objec

Apr 12, 2022
AbstractFactoryDesignPatternWithKotlin - Abstract Factory Design Pattern With Kotlin
AbstractFactoryDesignPatternWithKotlin - Abstract Factory Design Pattern With Kotlin

AbstractFactoryDesignPatternWithKotlin Abstract Factory Design Pattern With Kotl

Jan 2, 2022