-
[프로그래머스] 부분 문자열 이어 붙여 문자열 만들기알고리즘 노트 2023. 10. 18. 10:13
4개의 문자열을 parts의 start와 end로 잘라내서 합치는 연산을 하면 끝나는 문제입니다.
[문제풀이]
1. IntStream의 range()를 이용해 loop문을 구현합니다.
2. mapToObj로 String 문자열을 잘라 만들어 줍니다.
3. joining()으로 하나의 String 문자열 Object를 리턴합니다.
'알고리즘 노트' 카테고리의 다른 글
[프로그래머스] 접미사 배열 (0) 2023.10.18 [프로그래머스] 문자열의 뒤의 n글자 (0) 2023.10.18 [프로그래머스] 배열 만들기 5 (0) 2023.10.18 [프로그래머스] 문자열 여러번 뒤집기 (0) 2023.10.17 [프로그래머스] 9로 나눈 나머지 (0) 2023.10.17