[level 0] 세로 읽기

2025. 6. 8. 22:57·Daily Logs/Algorithm Practice

 

function solution(my_string, m, c) {
  let result = '';
  for (let i = 0; i < my_string.length; i += m) {
    const x = my_string.slice(i, i + m);
    if (c - 1 < x.length) {
      result += x[c - 1];
    }
  }
  return result;
}

- 주요 문법 :
[ Array.prototype.slice()](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)

'Daily Logs > Algorithm Practice' 카테고리의 다른 글

[level 0] 접미사인지 확인하기  (1) 2025.06.11
[level 0] 접미사 배열  (1) 2025.06.09
LV 0 문자열 뒤집기  (0) 2025.06.07
[level 0] 문자열의 앞의 n글자  (0) 2025.06.06
[level 0] 문자열의 뒤의 n글자  (0) 2025.06.05
'Daily Logs/Algorithm Practice' 카테고리의 다른 글
  • [level 0] 접미사인지 확인하기
  • [level 0] 접미사 배열
  • LV 0 문자열 뒤집기
  • [level 0] 문자열의 앞의 n글자
Jcob.moon
Jcob.moon
반가워요~ 하루하루 꾸준히 코딩 작성하는 곳입니다 !!
  • Jcob.moon
    Pixelated Thoughts
    Jcob.moon
  • 전체
    오늘
    어제
    • HelloWorld (174)
      • Daily Logs (123)
        • TIL (Today I Learned) (64)
        • Algorithm Practice (55)
        • Dev Book Notes (4)
      • Deep Dives (36)
        • 문제 해결 (Troubleshooting) (3)
        • CS Fundamentals (22)
        • Career Prep (4)
        • Technical Notes (7)
      • Project Log (7)
      • Any (3)
      • Cooperation (4)
        • Github (2)
        • Conventions (1)
        • Git (1)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 최근 댓글

  • hELLO· Designed By정상우.v4.10.3
Jcob.moon
[level 0] 세로 읽기
상단으로

티스토리툴바