Reducing Time Complexity From O(n²) to O(n)
Dec 29, 2025 · 4 min read · Using the Two Sum exercise from LeetCode we can study how a problem can be solved with less complexity. The description of the problem is very simple: Given an array of integers nums and an integer target, return indices of the two numbers such that...
Join discussion


