linklist updated with reverseinpair