Kotlin implementation of some algorithms/data structures
Modified algorithm of insertion sort which arranges an integer array in this order: At first all even elements go in ascending order, after them all odd elements in descending order.
Use merge sort algorithm to efficiently count inversions in an array
Compares quicksort variations of selecting pivot element/value by array element comparsions count. Runs on multiple threads.
Find median in array while reading it by one element. Uses Heap structure so complexity of insertion, deletion is O(log(N)). Median find complexity is O(1)
Comparsion of hash tables and hash functions:
- Open address vs chaining collision resolution methods comparsion
- Hash function comparsion: JVM HashCode vs Pseudo-random vs simple modulo