Algorithm
-
HashMap(프로그래머스 전화번호 목록)자료구조 2021. 12. 10. 20:14
프로그래머스 전화번호 목록 length, length(), size() length = 배열의 길이 length() = 문자열의 길이 size() = 컬렉션프레임워크의 길이 리스트 또는 Array 등 컬렉션 안에 들어있는 원소의 갯수(?) import java.util.HashMap; class Solution { public boolean solution(String[] phone_book) { //hashMap 생성 HashMap map = new HashMap(); for(int i = 0; i