public int get(int key){
        LinkedNode root = this;
        if(root == null){
            return -1;
        }
        while(root!=null){
            if(root.getKey() == key){
                return root.getValue();
            }
            root = root.getNext();
        }
        return -1;
    }