본문 바로가기 메뉴 바로가기

Coding 한놈만 팬다

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Coding 한놈만 팬다

검색하기 폼
  • 분류 전체보기 (203)
    • Algorithm (143)
      • 프로그래머스 (102)
      • Baekjoon (28)
      • Solve Problem (7)
      • 자료구조 (6)
    • Coding (16)
      • Spring & Project (8)
      • JAVA (6)
      • Node.js (1)
    • Tech Interview (30)
      • 기술 면접 준비 (29)
      • 컴퓨터 공학 퀴즈 (1)
    • 회고 (14)
      • 우당탕 개발자 성장기 (4)
      • 취준 회고 (5)
      • [ZB] 백준 장학금 (5)
  • 방명록

백준 1202 (1)
백준 1202번 - 보석 도둑

문제링크 문제 풀이 과정 보석을 가방에 넣는 로직에서 보석이 중복으로 들어가지 않는 것에 대해 오래 고민을 한 문제이다. 우선 보석의 무게와 비용을 한번에 담기 위해서 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
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • github
TAG
  • 코테 준비
  • 코딩테스트
  • 개발자 취업 준비
  • 기술 면접 준비
  • 개발자 취준
  • 백엔드 개발자 취업 준비
  • 취업준비
  • 제로베이스 백준 장학금
  • 프로그래머스 카카오
  • 프로그래머스 자바
  • 코딩테스트 공부
  • 백엔드 개발자 기술 면접 준비
  • 취준
  • 알고리즘
  • 코테준비
  • 프로그래머스
  • 백엔드 개발자
  • 제로베이스 백엔드 스쿨
  • 코테공부
  • 자바
  • java
  • 코딩테스트공부
  • 알고리즘 공부
  • 주니어 개발자 취업 준비
  • 알고리즘공부
  • 개발자 면접 준비
  • 자바공부
  • 백준
  • 코딩테스트 준비
  • 취업 준비
more
«   2025/06   »
일 월 화 수 목 금 토
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
29 30
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바