The code segment below uses the procedure IsFound (list, item), which returns true if item appears in list and returns false otherwise. The list resultList is initially empty.
  FOR EACH item IN inputList1{
 IF (isFound (inputList2, item) )
 APPEND (resultList, item)
 }
 Which of the following best describes the contents of resultList after the code segment is executed?
(A)All elements in inputListl followed by all elements in inputList2 (B)Only elements that appear in both inputListl and inputList2 (C)Only elements that appear in either inputListl or inputList2 but not in both lists (D)Only elements that appear in inputListl but not in inputList2
B