swap two adjacent elements by adjusting only the links (and not the datausing singly linked lists doubly linked lists implement the stl find routine that returns the iterator containing the first occurrence of in the range that begins at start and extends up to but not including end if is not foundend is returned this is nonclass (global functionwith signature template iterator finditerator startiterator endconst object ) given two sorted listsl and write procedure to compute using only the basic list operations given two sorted listsl and write procedure to compute using only the basic list operations the josephus problem is the following gamen peoplenumbered to nare sitting in circle starting at person hot potato is passed after passesthe person holding the hot potato is eliminatedthe circle closes ranksand the game continues with the person who was sitting after the eliminated person picking up the hot potato the last remaining person wins thusif and players are eliminated in orderand player wins if and the order of elimination is write program to solve the josephus problem for general values of and try to make your program as efficient as possible make sure you dispose of cells what is the running time of your programc if what is the running time of your programhow is the actual speed affected by the delete routine for large values of ( , ) modify the vector class to add bounds checks for indexing add insert and erase to the vector class according to the +standardfor the vectora call to push_backpop_backinsertor erase invalidates (potentially makes staleall iterators viewing the vector whymodify the vector class to provide stringent iterator checking by making iterators class types rather than pointer variables the hardest part is dealing with stale iteratorsas described in exercise assume that singly linked list is implemented with header nodebut no tail nodeand that it maintains only pointer to the header node write class that includes methods to return the size of the linked list print the linked list test if value is contained in the linked list add value if it is not already contained in the linked list remove value if it is contained in the linked list repeat exercise maintaining the singly linked list in sorted order add support for operatorto the list iterator classes