Could not understand how to sort throungh 1 field using comparator

plz correct my code

@abhay_091 you have shared the wrong code,there are no employees

https://ide.codingblocks.com/s/203152 now tell what to do

@aa1 Nishant is a very naughty boy in Launchpad Batch. One day he was playing with strings, and randomly shuffled them all. Your task is to help Nishant Sort all the strings ( lexicographically ) but if a string is present completely as a prefix in another string, then string with longer length should come first. Eg bat, batman are 2 strings and the string bat is present as a prefix in Batman - then sorted order should have - Batman, bat.

the question is to sort the strings lexographically except when they are subset. u need to overload the compare function .keep a count for the number of letter similar in two words if it is equal to the the smaller words length it comes first