---
title: "Discussion on \"Reducing Time Complexity From O(n²) to O(n)\" | Hashnode"
description: "Discussion on \"Reducing Time Complexity From O(n²) to O(n)\". 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:\n\nGiven an array of integers nums and an integer target, return indices of the two numbers such that..."
url: "https://hashnode.com/posts/reducing-time-complexity-from-on-to-on/6952a485cac47508c64df863"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Reducing Time Complexity From O(n²) to O(n)](https://joaodeveloper.hashnode.dev/reducing-time-complexity-from-on-to-on?utm_source=hashnode&utm_medium=feed)

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...

Dec 29, 2025 · 4 min read · joaodeveloper.hashnode.dev  
Updated Jan 3  
Read the article

-   [#time-complexity](https://hashnode.com/tag/time-complexity)
-   [#boxing](https://hashnode.com/tag/boxing)
-   [#unboxing](https://hashnode.com/tag/unboxing)
-   [#csharp](https://hashnode.com/tag/csharp)
-   [#dictionaries](https://hashnode.com/tag/dictionaries)
-   [#hash-table](https://hashnode.com/tag/hash-table)

## Written by

[João Marcos Carniel](https://hashnode.com/@joaomarcoscarniel)

@joaomarcoscarniel

  
[View profile](https://hashnode.com/@joaomarcoscarniel)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
