본문 바로가기

프로그래머스6

[프로그래머스] 기능개발(JAVA) programmers.co.kr/learn/courses/30/lessons/42586 코딩테스트 연습 - 기능개발 프로그래머스 팀에서는 기능 개선 작업을 수행 중입니다. 각 기능은 진도가 100%일 때 서비스에 반영할 수 있습니다. 또, 각 기능의 개발속도는 모두 다르기 때문에 뒤에 있는 기능이 앞에 있는 �� programmers.co.kr import java.util.*; class Solution { public int[] solution(int[] progresses, int[] speeds) { Stack stack=new Stack(); for(int i=progresses.length-1;i>=0;i--) { float temp=(float)(100-progresses[i])/(float.. 2020. 9. 17.
[프로그래머스] 주식가격(JAVA) programmers.co.kr/learn/courses/30/lessons/42584 코딩테스트 연습 - 주식가격 초 단위로 기록된 주식가격이 담긴 배열 prices가 매개변수로 주어질 때, 가격이 떨어지지 않은 기간은 몇 초인지를 return 하도록 solution 함수를 완성하세요. 제한사항 prices의 각 가격은 1 이상 10,00 programmers.co.kr import java.util.*; class Solution { public int[] solution(int[] prices) { ArrayList list=new ArrayList(); for(int i=0;i 2020. 9. 17.
[프로그래머스] 위장(JAVA) programmers.co.kr/learn/courses/30/lessons/42578 코딩테스트 연습 - 위장 programmers.co.kr import java.util.HashMap; class Solution { public int solution(String[][] clothes) { HashMap hashmap=new HashMap(); for(int i=0;i 2020. 9. 17.
[프로그래머스] 베스트앨범(JAVA) programmers.co.kr/learn/courses/30/lessons/42579 코딩테스트 연습 - 베스트앨범 스트리밍 사이트에서 장르 별로 가장 많이 재생된 노래를 두 개씩 모아 베스트 앨범을 출시하려 합니다. 노래는 고유 번호로 구분하며, 노래를 수록하는 기준은 다음과 같습니다. 속한 노래가 �� programmers.co.kr import java.util.*; import java.util.Map.Entry; class Solution { class Song implements Comparable{ int id, play; String genre; Song(int id, int play, String genre){ this.id=id; this.play=play; this.genre=gen.. 2020. 9. 10.