Algorithms implementation for testing and practice