Skip to content

Efficiently Satisfying Hunger: Utilizing Trie Trees and Heap Data Structures to Find the Nearest Restaurant Alphabetically

Notifications You must be signed in to change notification settings

MiladNooraei/Data-Structure-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Data Structure Project

The task is to find the closest restaurant alphabetically for a hungry user

Description

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.

About

Efficiently Satisfying Hunger: Utilizing Trie Trees and Heap Data Structures to Find the Nearest Restaurant Alphabetically

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages