searching and sorting ( low ( high low ( mid high low ( high mid low ( mid high low high mid ( low high mid ( mid high low ( mid high/low ( high low mid figure performing binary search on sorted list when searching for value last exam flipped onto the new stack you now have single stack of exams in alphabetical order similar approach can be used to merge two sorted lists consider the illustration in figure which demonstrates this process on the sample lists created in the example code segment from earlier the items in the original list are not removedbut instead copied to the new list thusthere is no "topitem from which to select the smallest value as was the case in the example of merging two stacks of exams insteadindex variables are used to indicate the "topor next value within each list the implementation of the mergesortedlists(function is provided in listing the process of merging the two lists begins by creating new empty list and initializing the two index variables to zero loop is used to repeat the process