Write a Prefix class. The class should have a single getter: prefixes, which is initialized as an empty hash. Each (key, value) pair in this hash will be a prefix coupled with the words that begin with this prefix.
The Prefix class should have three instance methods:
To illustrate, if we create an instance of the Prefix class:
prefix_list = Prefix.new
prefix_list.add_prefixes("auto", "aqua", "amphi")
prefix_list.add_words("automate", "automobile", "automotive", "amphibian", "aquarium")
prefix_list.sort
prefix_list.prefixes
# {"amphi"=>["amphibian"],
# "aqua"=>["aquarium"],
# "auto"=>["automate", "automobile", "automotive"]}Words for each prefix-word key-value pair should be in the same order as the input.