The task is to find the closest restaurant alphabetically for a hungry user
The task is to find the closest restaurant alphabetically for a hungry user using Trie and Heap data structures. There is an input file which in first line it gives number of restaurants(n). In the next n lines there is a restaurant name and its distance from hungry user. The task is to find a restaurant which its named starts with s and its distance whould be less than k. In here we are looking for a restaurant in the closest k restaurants which its name alphabetically come first, not the closest distance!
Thats why it has been implemented by heap and trie. each time we have to heapify and update our trie tree to find desired restaurant.