HashMap HashMap is not thread-safe which allows you faster speed than HashTable. HashMap doesn't allow insertion order. *Use LinkedHashMap to preserve the fixed order. key doesn't allow duplicate key, but for value, duplication is allowed. put() - key, value map에 입력 get() - key를 전달해야 그 key의 value가 반환된다. remove() - 해당 key의 key와 value 삭제 Example Code import java.util.*; public class Main { public ..
Map - getOrDefault(key, Default-value) If the key is already mapped with a specified value, return the value, or return the default value if no value is associated with any key. 특정 key가 특정 value와 map 되어있다면 해당 value를 리턴하고 map이 안되어 있을 경우 default value를 리턴한다. Example code import java.util.*; public class Main { public static void main(String[] args) { String[] fruit = {"apple", "banana", "apple", "..
문제 수많은 마라톤 선수들이 마라톤에 참여하였습니다. 단 한 명의 선수를 제외하고는 모든 선수가 마라톤을 완주하였습니다. 마라톤에 참여한 선수들의 이름이 담긴 배열 participant와 완주한 선수들의 이름이 담긴 배열 completion이 주어질 때, 완주하지 못한 선수의 이름을 return 하도록 solution 함수를 작성해주세요. 제한사항 마라톤 경기에 참여한 선수의 수는 1명 이상 100,000명 이하입니다. completion의 길이는 participant의 길이보다 1 작습니다. 참가자의 이름은 1개 이상 20개 이하의 알파벳 소문자로 이루어져 있습니다. 참가자 중에는 동명이인이 있을 수 있습니다. 입출력 예시 participant completion return [leo, kiki, ed..
- Total
- Today
- Yesterday
- 알고리즘
- substring()
- code refactoring
- 프로그래머스
- HackerRank Algorithm
- easy javascript algorithm
- java
- ... in Javascript
- hackerrank javascript solution
- spring boot application
- compareTo()
- hackerrank javascript
- rest parameter
- hackerrank solution
- HashMap
- C++
- hackerrank
- 프로그래머스 알고리즘
- Object type casting
- Javascript Algorithm
- repeat()
- javascript
- easy algorithm
- equals()
- string class in java
- algorithm
- math.abs
- Collection Framework
- 프로그래머스 알고리즘문제
- math.max
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |