import re


def gen_url(problem_title):
    """Generate LeetCode url of the problem."""
    url_template = "https://leetcode.com/problems/{}"
    url = url_template.format(re.sub(r'[^\w\s]', '', problem_title))
    assert('`' not in url)
    return '-'.join(url.split()).lower()