카타 8급 Reverse list recursively

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:47 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

C

int* revR (int* array, int n) {
  for(int i=0; i<n/2; i++) {
    int temp = array[i];
    array[i] = array[n-1-i];
    array[n-1-i] = temp;
  }
  return array;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}