Java (376) 썸네일형 리스트형 [LeetCode- Ch.1 문자열] 4. 플러스 원 https://leetcode.com/problems/plus-one/submissions/ Plus One - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com import java.util.stream.Stream; class Solution { public int[] plusOne(int[] digits) { //비어 있지 않은 십진수 배열 주어지면 1증가 //배열의 마지막 숫자에 +1 //숫자 0제외 정수 앞에 0미포함 int n = digits.length.. [LeetCode- Ch.1 문자열] 3. 라이센스 키 포맷 (+ StringBuilder.insert(위치,문자)) https://leetcode.com/problems/license-key-formatting/submissions/ License Key Formatting - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { public String licenseKeyFormatting(String s, int k) { //뒤에서부터 k개수만큼 자르고 사이에 '-' 문자 추가하기 //소문자일 경우 대문자로 변경 //1.ds //모든 '-'문자 제거.. [LeetCode- Ch.1 문자열] 2. 보석과 돌 (+ toCharArray) https://leetcode.com/problems/jewels-and-stones/submissions/ Jewels and Stones - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { public int numJewelsInStones(String jewels, String stones) { //1.ds char[] jew_arr = jewels.toCharArray(); int count=0; //2.loop for(cha.. [LeetCode- Ch.1 문자열] 1. 고유한 이메일 (+ StringBuilder, toCharArray) https://leetcode.com/problems/unique-email-addresses/submissions/ Unique Email Addresses - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com import java.util.*; class Solution { public int numUniqueEmails(String[] emails) { int N=emails.length; Set set = new HashSet(); //2. Loop //: .. [SW 아카데미] 3282. 0/1 Knapsack https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AWBJAVpqrzQDFAWr&categoryId=AWBJAVpqrzQDFAWr&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=ALL&select-1=3&pageSize=30&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. 냅색 알고리즘 dy[] : 해당 인덱스에서 할 수 있는 최고의 선택 int n=kb.nextInt(); int m=kb.n.. [SW 아카데미] 4615. 재미있는 오셀로 게임 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AWQmA4uK8ygDFAXj&categoryId=AWQmA4uK8ygDFAXj&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=30&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. 현재 위치에서 가까운 다른 돌 체크 2. 현재 위치에서 가까운 같은 돌 체크 3. 현재 위치에서 가까운 같은 돌부터 가까.. [SW 아카데미] 1493. 새로운 수의 연산 # https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV2b-QGqADMBBASw&categoryId=AV2b-QGqADMBBASw&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=30&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. 대각선 순서로 값 매기기 -> 값으로 좌표 출력 메서드와 좌표로 값 출력 메서드 필요 -> 좌표를 배열로 작성 2. fo.. [SW 아카데미] 1860. 진기의 최고급 붕어빵 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV5LsaaqDzYDFAXc&categoryId=AV5LsaaqDzYDFAXc&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=30&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. N명의 예약 손님, M초당 K개의 붕어빵 2.시간순으로 정렬 필수 : 이미 팔린 붕어빵 개수 차감을 위해 ////////.. 이전 1 ··· 7 8 9 10 11 12 13 ··· 47 다음