ended2월 22일· 1 sources

Leetcode Sunday #4

내 '최악의' 복잡도 솔루션이 100% 런타임을 달성한 이유 — Go로 푼 Binary Gap

Why it matters

Binary Gap 문제를 Go로 푼 경험을 다룬 글이다. O(n log n) 정렬 방식이 이론상으로는 최악이지만, 실제로는 O(log n) 최적 방식보다 더 빠른 실행 속도를 기록했다. 이는 입력 크기가 32비트로 제한되어 있어서 점근 복잡도가 실제 성능과 큰 차이를 보일 수 있음을 보여준다.

1
Sources
+0
24h
Growth
210d
Active
algorithmbinary gapcomplexityconsecutive sequencegohappy numberhash setleetcodemerge intervals

Sources

Related Issues