give array string word integer k return k frequent stringsReturn answer sort frequency highest low Sort word frequency lexicographical order example 1input word iloveleetcodeilovecode k 2output iloveexplanation love frequent wordsnote come love low alphabetical orderexample 2input word thedayissunnythethethesunnyisis k 4Output theissunnydayExplanation sunny day frequent word number occurrence 4 3 2 1 respectively Constraints1 wordslength 5001 wordsilength 10wordsi consist lowercase english lettersk range 1 the number unique wordsi Followup could solve on logk time on extra space