연락처 관리에서의 시간 복잡도
이전 연습 문제에서 구현한 연락처 관리 애플리케이션에서, findContact 메서드의 시간 복잡도는 무엇이었나요?
public Contact findContact(String name) {
// Complete loop to search through contacts
for (Contact contact : contacts) {
if (contact.getName().equals(name)) {
// Return the match
return contact;
}
}
return null;
}
이 연습은 강의의 일부입니다
