PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Discord

Implement Game Metadata Lookups

Last updated: May 5, 2026

Quick Overview

This question evaluates in-memory data modeling, search and aggregation over structured records, case-insensitive string handling, and counting unique platform entries.

  • hard
  • Discord
  • Coding & Algorithms
  • Data Engineer

Implement Game Metadata Lookups

Company: Discord

Role: Data Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Onsite

You are given a list of game metadata records. Build an in-memory representation that can store each game's name, release date, platforms, genre, publisher, optional country, and relevant Discord servers. Then implement lookup functions over the data. Example input: ```python games = [ { "name": "Cyber Quest", "release_date": "2025-01-01", "platform": ["playstation", "xbox"], "genre": "RPG", "publisher": "GameStudio A" }, { "name": "Battle Arena", "release_date": "2024-11-15", "platform": ["pc"], "genre": "Action", "publisher": "GameStudio B" }, { "name": "Sky Adventure", "release_date": "2025-02-10", "platform": ["playstation"], "genre": "Adventure", "publisher": "GameStudio A" }, { "name": "Mystery World", "release_date": "2023-07-20", "platform": ["xbox", "pc"], "genre": "Puzzle", "publisher": "GameStudio C" }, { "name": "Speed Racer", "release_date": "2025-03-05", "platform": ["pc", "playstation"], "genre": "Racing", "publisher": "GameStudio B" } ] ``` Implement the following functions: ```python def get_genre(input_game): """Given a game name, return the genre of that game. Return None if not found.""" return None def get_games(input_genre): """Given a genre, return a list of game names with that genre.""" result = [] return result def get_most_available_games(games): """Return all game names that are available on the largest number of unique platforms.""" result = [] return result def get_available_games(number_of_platform): """Return all game names that are available on exactly number_of_platform unique platforms.""" result = [] return result ``` Requirements: - Treat game-name and genre lookups as case-insensitive. - Count unique platforms for each game. - If multiple games tie for the largest number of platforms, return all of them. - Preserve the original game names in returned results.

Quick Answer: This question evaluates in-memory data modeling, search and aggregation over structured records, case-insensitive string handling, and counting unique platform entries.

Related Interview Questions

  • Implement an asyncio-based chat server - Discord (medium)
Discord logo
Discord
Apr 3, 2026, 12:00 AM
Data Engineer
Onsite
Coding & Algorithms
0
0

You are given a list of game metadata records. Build an in-memory representation that can store each game's name, release date, platforms, genre, publisher, optional country, and relevant Discord servers. Then implement lookup functions over the data.

Example input:

games = [
    {
        "name": "Cyber Quest",
        "release_date": "2025-01-01",
        "platform": ["playstation", "xbox"],
        "genre": "RPG",
        "publisher": "GameStudio A"
    },
    {
        "name": "Battle Arena",
        "release_date": "2024-11-15",
        "platform": ["pc"],
        "genre": "Action",
        "publisher": "GameStudio B"
    },
    {
        "name": "Sky Adventure",
        "release_date": "2025-02-10",
        "platform": ["playstation"],
        "genre": "Adventure",
        "publisher": "GameStudio A"
    },
    {
        "name": "Mystery World",
        "release_date": "2023-07-20",
        "platform": ["xbox", "pc"],
        "genre": "Puzzle",
        "publisher": "GameStudio C"
    },
    {
        "name": "Speed Racer",
        "release_date": "2025-03-05",
        "platform": ["pc", "playstation"],
        "genre": "Racing",
        "publisher": "GameStudio B"
    }
]

Implement the following functions:

def get_genre(input_game):
    """Given a game name, return the genre of that game. Return None if not found."""
    return None


def get_games(input_genre):
    """Given a genre, return a list of game names with that genre."""
    result = []
    return result


def get_most_available_games(games):
    """Return all game names that are available on the largest number of unique platforms."""
    result = []
    return result


def get_available_games(number_of_platform):
    """Return all game names that are available on exactly number_of_platform unique platforms."""
    result = []
    return result

Requirements:

  • Treat game-name and genre lookups as case-insensitive.
  • Count unique platforms for each game.
  • If multiple games tie for the largest number of platforms, return all of them.
  • Preserve the original game names in returned results.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Discord•More Data Engineer•Discord Data Engineer•Discord Coding & Algorithms•Data Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.