What\'s the most efficient way to lower case every element of a List or Set?
My idea for a List:
final List strings = new ArrayList<
Well, there is no real elegant solution due to two facts:
Strings in Java are immutablemap(f, list) function as you have in functional languages.Asymptotically speaking, you can't get a better run time than your current method. You will have to create a new string using toLowerCase() and you will need to iterate by yourself over the list and generate each new lower-case string, replacing it with the existing one.