코딩테스트 96

[programmers] 이모티콘 할인행사

https://school.programmers.co.kr/learn/courses/30/lessons/150368 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr emoticons 의 최대 크기는 7이고 할인율은 4가지(10%, 20%, 30%, 40%)이기 때문에 많지 않은 숫자임으로 중복 조합을 사용하였다. /** 1. emoticons 중복조합 2. 중복 조합 경우로 최대 이모티콘 플러스 서비스 유저, 액수 구하기 **/ import java.util.*; class Solution { static int minPercent; static int[]..

코딩테스트 2024.03.13

33. Search in Rotated Sorted Array

https://leetcode.com/problems/search-in-rotated-sorted-array/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 target의 index를 구하는 문제 nums 배열의 크기가 5000이라 for문 하나를 사용해도 문제없이 돌아갔다. class Solution { public int search..

코딩테스트 2024.02.22

409. Longest Palindrome

https://leetcode.com/problems/longest-palindrome/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 /** 1. 문제 해석하기 가장 긴 palindrome 만들기 2. 문제 풀이 방향 홀수는 한개(가장 긴 홀수를 찾아야함) 짝수는 전부 하면 무조건 palindrome을 만들 수 있을 것 같음. */ c..

코딩테스트 2024.02.17

234. Palindrome Linked List

https://leetcode.com/problems/palindrome-linked-list/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 palindrome에 대해서 잘 몰라서 풀이 방식에 대해 찾아보았다. 1. 절반으로 나눠서 비교하는 방법 2. 뒤집은 다음에 같은지 확인하는 방법 1번으로 푼 코드 8ms /** * Definit..

코딩테스트 2024.02.16