Banner

My Tech Blog (전략)

오늘의 명언
22. 그리디 (Greedy)항상 가장 최선의 선택(국소 최적)이 전체 최적을 만든다고 가정예: 거스름돈 문제int[] coins = {500, 100, 50, 10};int target = 1260;int count = 0;for (int coin : coins) { count += target / coin; target %= coin;}System.out.println(count); // 최소 동전 개수📌 대표 문제: 동전 문제, 회의실 배정, 배낭 문제(단순), 줄 세우기, 최소 비용 선택 23. 누적합 (Prefix Sum)구간 합을 빠르게 구하기 위해 전체 누적합을 미리 계산int[] arr = {1, 2, 3, 4, 5};int[] prefix = new int[arr.length..
0. 자주 사용하는 라이브러리import java.util.*; // List, Map, Set, Queue 등 자료구조import java.io.*; // BufferedReader, InputStreamReader 등 입출력import java.math.*; // BigInteger, BigDecimal 등 정수/소수 연산 1. 변수 & 배열 선언// 문자열 배열String[] arr1 = new String[5];String[] arr2 = {"a", "b", "c"};// 정수 배열int[] arr3 = new int[3];int[] arr4 = {1, 2, 3}; 2. Arrays 유틸리티 활용int[] arr = {10, 8, 11, 2, 3, 0};// 오름차순..
· 이것저것
1. 친근한 자기소개 준비해가기도입부 + 본문 + 마무리 형식으로 준비하기 (도입부) 당신과 이야기를 나누게 되어 기쁩니다.Hi, Ava. My name is Dain, but you can call me D. It's nice to be speaking with you.  (본문1) 내가 하는 일 & 얼마나 일 했는지To tell you a little about myself, I work for a construction supervision company. Right now, we’re building a road, and I’ve been working here for about three months. My role involves answering phone calls, handling pap..
상단으로