It seems that sortList.cpp does not meet the requirement of constant space complexity.
Author: RocFangCreated Nov 13, 2014Updated Oct 2, 2021
https://github.com/haoel/leetcode/blob/master/src/sortList/sortList.cpp
return mergeTwoLists(sortList(head), sortList(p2));
Source: haoel/leetcode