Frage im Vorstellungsgespräch bei Tiger Analytics

Sort an array based upon frequency of elements. Reverse the elements of string without altering their order.