Sorting a list by the modulus of 3
Your code definitely doesn't work with any number except 3, and it's quite likely you'll make an error if you'll be changing the code to another number. So I'd use 

public LinkedList sortMod(int a[], int number)


instead. Also, the code returns null when there's no numbers of any modulus. I.e. sortMod(new int[]{1}) returns null as well as sortMod(new int[]{1, 4, 7, 10, 13}).

You can also try to use Streams, feature of Java 8. For example, the single line

return map.values().stream().map(ArrayList::new).collect(Collectors.toList());


does a lot of job, effectively replacing 10 lines of your code. You can try to make the task in two lines using Java 8 features. Also it works fine with sortMod(new int[]{1, 4, 7, 10, 13}).