Posts Tagged 'sort'

Project Euler : Sum Total Of All Name Scores

Problem 22 of Project Euler defines name score as the word value of a name multiplied by its position when a list of names is sorted. So, we need to sort the array first. I used Radix Sort for it. Simple implementation, it has been written below:

RadixComparator class:

package pba.common.text;

import java.util.Comparator;

/**
 * This is the Comparator class to be used for Radix Sorting.
 *
 * @author AnuvratSingh
 ...
Continue Reading ?
0