
문제링크 문제 풀이 과정 보석을 가방에 넣는 로직에서 보석이 중복으로 들어가지 않는 것에 대해 오래 고민을 한 문제이다. 우선 보석의 무게와 비용을 한번에 담기 위해서 Item 클래스를 만들었다. static class Item implements Comparable{ int idx; int weight; int cost; public Item(int idx, int weight, int cost) { this.idx = idx; this.weight = weight; this.cost = cost; } @Override public int compareTo(Item o) { if(this.weight == o.weight){ return o.cost - this.cost; } return this.we..
Algorithm/Baekjoon
2023. 1. 20. 12:41
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 제로베이스 백엔드 스쿨
- 백엔드 개발자 취업 준비
- 알고리즘공부
- 개발자 취준
- 취업 준비
- 백엔드 개발자 기술 면접 준비
- java
- 코딩테스트 공부
- 자바공부
- 백준
- 프로그래머스 카카오
- 백엔드 개발자
- 코테 준비
- 기술 면접 준비
- 제로베이스 백준 장학금
- 코테준비
- 취준
- 코테공부
- 알고리즘 공부
- 프로그래머스
- 자바
- 취업준비
- 프로그래머스 자바
- 주니어 개발자 취업 준비
- 코딩테스트 준비
- 코딩테스트
- 코딩테스트공부
- 개발자 취업 준비
- 알고리즘
- 개발자 면접 준비
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함