Skip to content

Instantly share code, notes, and snippets.

View maksmakuta's full-sized avatar

Maks Makuta maksmakuta

  • Ukraine
View GitHub Profile
@maksmakuta
maksmakuta / main.kt
Created December 30, 2023 14:41
Graph code generator from maze matrix for https://edotor.net/
data class Point(
val x : Int,
val y : Int
)
// maze NxM where 0 is empty cell and 1 is wall
val data = arrayOf(
intArrayOf(0,0,0,0,0),
intArrayOf(0,1,1,0,1),
intArrayOf(0,1,0,0,1),
intArrayOf(0,0,0,0,1),
import kotlin.math.pow
import kotlin.math.sqrt
import kotlin.random.Random
import kotlin.time.measureTime
data class City(
val name : String,
val x : Double,
val y : Double
){
@maksmakuta
maksmakuta / pathwalker_v3.kt
Last active October 29, 2023 19:42
shortest path finding with dijkstra algorithms based on priority queve
import java.io.File
import java.util.*
import kotlin.random.Random
import kotlin.random.nextInt
import kotlin.time.measureTime
data class Edge(
val a : Int,
val b : Int,
val w : Int
import kotlin.random.Random
import kotlin.random.nextInt
import kotlin.time.measureTime
data class Edge(
val a : Int,
val b : Int,
val w : Int
){
fun print(){
/**
* You can use https://play.kotlinlang.org/ to test this code
*/
import kotlin.random.Random
import kotlin.random.nextInt
import kotlin.time.measureTime
data class Edge(
val a : Int,
class Person{
constructor(s,n,y,c,r,f,l){
this.surname = s;
this.name = n;
this.year = y;
this.city = c;
this.specialnist = r;
this.form = f;
this.languages = l;
}
@maksmakuta
maksmakuta / gist:d2dc8dfbe15f492536bce08d09cde50a
Created August 24, 2021 17:35
Core .vimrc for noobs like me
set nocompatible
syntax on
set mouse =a
set autoindent
set expandtab
set softtabstop =2
set shiftwidth =2
set shiftround
set backspace =indent,eol,start