https://leetcode.com/problems/sort-list/description/

 

LeetCode - The World's Leading Online Programming Learning Platform

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

 

너무 어려웠다.

문제의 의도는 recursion으로 풀으라고 한게 아닐까 추측해본다. O(logN) space를 사용하는..

나는 이틀 고민해서 진짜 O(1) space로 풀었는데 이거 면접에서 30분안에 풀진 못할거같다.

 

내가 쓴 솔루션 링크

https://leetcode.com/problems/sort-list/solutions/4603526/python3-no-recursion-beats-99-in-memory-code-with-explanation/

 

LeetCode - The World's Leading Online Programming Learning Platform

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

 

그래도 고생한 보람은 있었다.

전체 제출자중에 메모리 효율성에서 나를 이길 사람이 없었다!

+ Recent posts