gusdnr9875   6년 전

두번째 sort함수에서 invalid comparator 에러가 납니다. 이유가 무엇일까요?

gusdnr9875   6년 전

sort를 위한 compare 함수는 반드시 strict weak ordering을 만족해야 합니다. 즉, a==b인 경우에는 a<b도 false이고 a>b도 false가 되어야 합니다.

https://en.wikipedia.org/wiki/

댓글을 작성하려면 로그인해야 합니다.