CodingTest 123

[프로그래머스 / Java] Lv.0 문자열 뒤집기

Question https://school.programmers.co.kr/learn/courses/30/lessons/120822 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krCodeclass Solution { public String solution(String my_string) { StringBuilder answer = new StringBuilder(my_string); return answer.reverse().toString(); }}  * StringBuilder VS StringBuffer가변 문자열 클래스로, 문자열을 효율적으로 조작할 수 있게 ..

[프로그래머스 / Java] Lv.0 세균 증식

Question https://school.programmers.co.kr/learn/courses/30/lessons/120910 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krCode방법 1. 비트 이동 연산자(shift operator) // 비트 이동 연산자 사용class Solution { public int solution(int n, int t) { int answer = 0; answer = n  answer = n : 비트 이동 연산자(shift operator)왼쪽이동 (n의 이진수 표현에서 각 비트를 왼쪽으로 t칸 이동시키고, 오른쪽 빈 ..