Deleting Bobby (swap)—more efficient
{"Image DocumentName": "Deleting Bobby (swap)\u2014more efficient", "Image ImageDescription": "public void delete (String item) // Deletes the element that matches item from this list. { int location = 0; while (item.compareTo(list[location]) != 0) location++; list[location] = list[numItems - 1]; numItems--; }", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}