storing jfk(acreating new node with element bwi and linking it in(bafter the insertion removal in the middle of doubly linked list likewiseit is easy to remove node in the middle of doubly linked list we access the nodes and on either side of using ' getprev and getnext methods (these nodes must existsince we are using sentinelsto remove node vwe simply have and point to each other instead of to we refer to this operation as the linking out of we also null out ' prev and next pointers so as not to retain old references into the list this algorithm is given in code fragment and is illustrated in figure code fragment removing node in doubly linked list this method works even if is the firstlastor only nonsentinel node