O(nlog(n)) O(log(n)) if avg len of strings are considered constant