i) insertItem(k, e): Inserts element e by comparing the key k as the priority
ii) removeMinElement(): Remove the element with minimum/maximum priority from the queue and return that
b) The String keys can be suitable if we are aiming for the strings to be kept in sorted order. In that case, we pass the key as the string itself, and priority queue will sort the list as per value of Strings in alphabetic order(Default sorting). So String “ABCD” will come before “BCD”, as A comes before B in alphabet.
While, if we want the strings to be fetched in order of most used strings, we may want to pass a differnt key value along with string element which denotes the priority of the string. If a particular string is used very much, its priority will be high, while a low used string will be less priority.