public function add($key, $value): bool {
        $arrayIndex = $this->getBucketIndex($key);
        if (isset($this->bucket[$arrayIndex])) {
            $list = $this->bucket[$arrayIndex];
        } else {
            $list = new SinglyLinkedList();
        }
        if ($list->containsKey($key)) {
            $list->replaceValue($key, $value);
            return true;
        }
        $list->add($key, $value);
        $this->bucket[$arrayIndex] = $list;
        return true;
    }