Code of various discussed algorithms