def return_kth_to_last(linked_list):
    """
    Implement an algorithm to find the kth to last element in a
    singly linked list.
    """
    if not linked_list:
        return None

    values = {}
    pass_ = 0
    node = linked_list.head
    done = False
    while done is False:
        if not node:
            kth = values.get(pass_ - 1 if pass_ != 1 else 1)
            return kth
        else:
            pass_ += 1
            values[pass_] = node
            node = node.get_next_node()