RUG Building Lookup
2 September 2026A quick tool I built to help students at the University of Groningen (RUG) find building information. Instead of hunting through a PDF or website, you can search by building code and instantly see the location and department.
How It Works
The tool uses a Trie data structure—a tree-like structure that's optimized for prefix searches. As you type a building code (e.g., "112"), it shows all buildings that start with those digits. If you enter an incomplete or incorrect code, the tool uses fuzzy matching (Levenshtein distance) to suggest the closest matches.
Why a Trie?
For large datasets with many similar prefixes, a Trie is incredibly efficient. Each building code is inserted into the tree, and searching becomes a simple traversal—no need to scan the entire dataset every time. The fuzzy matching fallback ensures you can still find buildings even if you're not sure of the exact code.
Building Codes at RUG
RUG uses a systematic 4-digit building code system:
- 1000s: Faculty of Arts (Grote Markt area)
- 2000s: Faculty of Science (Groningen center)
- 3000s: Medical/Health Sciences
- 4000s: Faculty of Behavioural and Social Sciences
- 5000s: Faculty of Engineering & Natural Sciences (Zernike Campus)
- 7000s: Remote locations (Ezinge, Schiermonnikoog, Leeuwarden)
Try searching for a code like "1211" (the library) or "5161" (Bernoulliborg) to see the tool in action.
Try It Yourself
Use the interactive tool below to search by building code or building name: