Solved different algorithms based problem