[問題] merge sort
開發平台(Platform): (Ex: Win10, Linux, ...)
Mac
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
g++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
請各位幫我debug 一下
我的merge sort
我怎麼看都覺得奇怪
我感覺自己沒寫錯啊
餵入的資料(Input):
我隨便餵ㄧ組資料
http://i.imgur.com/uBDGzqC.jpg
預期的正確結果(Expected Output):
應該要是54321
錯誤結果(Wrong Output):
54231
程式碼(Code):(請善用置底文網頁, 記得排版)
http://i.imgur.com/bQ3Dn1i.jpg
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.100.85.79
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1491468825.A.480.html
→
04/06 16:56, , 1F
04/06 16:56, 1F
→
04/06 16:56, , 2F
04/06 16:56, 2F
推
04/06 17:53, , 3F
04/06 17:53, 3F
→
04/06 17:54, , 4F
04/06 17:54, 4F
推
04/06 23:36, , 5F
04/06 23:36, 5F
→
04/06 23:36, , 6F
04/06 23:36, 6F
→
04/07 21:28, , 7F
04/07 21:28, 7F
討論串 (同標題文章)