강의

멘토링

커뮤니티

Inflearn Community Q&A

marrin11010356's profile image
marrin11010356

asked

Learning data structures and algorithms with C++

Implementation of merge sort

병합정렬의 구현 소스코드 오류문제가 있는것 같아요.

Written on

·

182

0

항상 좋은 강의 해주셔서 감사합니다. 덕분에 많이 배우고 있습니다.

근데 소스 코드가 오류가 있는것 같습니다. 제 생각엔 while(second < n) 이부분인데요

a[] = {9,8,7,6,5,4,3,2,1}로 했을경우 1이 쓰레기값이 들어가서

최종 정렬 형태가 -8543456691 23456789 이런식으로 나옵니다.

C++

Answer

This question is waiting for answers
Be the first to answer!
marrin11010356's profile image
marrin11010356

asked

Ask a question