개발/알고리즘
[프로그래머스] 문자열 압축
문제 https://programmers.co.kr/learn/courses/30/lessons/60057 코딩테스트 연습 - 문자열 압축 데이터 처리 전문가가 되고 싶은 "어피치"는 문자열을 압축하는 방법에 대해 공부를 하고 있습니다. 최근에 대량의 데이터 처리를 위한 간단한 비손실 압축 방법에 대해 공부를 하고 있는데, 문 programmers.co.kr 코드 class Solution { public int solution(String s) { int answer = 2000; for (int len = 1; len tempResult){ answer = tempResult; } } return answer; } // len 갯수 만큼 자르자 private int compress(int len, S..
2021. 8. 25. 00:00
최근댓글