Famous sorting algorithms based on vote popularity and time implemented for nodejs