def quadratic_probe(h, i, m):
    """
    Finds a possible next position using quadratic probing
    Note that there are many different ways of doing this, such as
    with a formula in the form ai + bi^2. This is just a simple example

    Quadratic hashing reduces primary clustering: linear probing may
    lead to large chunks of values together, reducing efficiency

    Quadratic hashing may lead to secondary clustering, although this
    isn't as much of an issue. The bigger problem is skipping indices
    (for example, we might only get to even indices in some cases); we
    need a load factor of at most 1/2 and a prime sized table to ensure
    that an empty cell will always be found

    :param h: Computed hash value that has resulted in a collision
    :param i: Offset
    :param m: Size of the table
    :return: The next index to be checked if it is open
    """
    return (h + i*i) % m