Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#22·leetcode

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

View original on GitHubView discussion on GitHub