n + logn - 2 comparisons realisation
#Results for string s = "sssssssss...."
// n = 2000
//s.length = 100000
// 154 - simple method = 2 * n => n = 77 for this time
//96 - advanced method 77 + log(77) - 2 = 83
// n = 2000
//s.length = 500000
// 843 - simple method = 2 * n => n = 421.5 for this time
// 436 - advanced method = 421.5 + log(421.5) - 2 = 428.21