DB
Tech Watch
HomeBlogLabsDSAProjectsAbout

DSA

Data Structures & Algorithms

Documented LeetCode solutions with complexity analysis and algorithmic patterns. Hash Map, Two Pointers, Sliding Window, and more.

Data Structures & Algorithms

Two Sum — Hash Map in O(n)

Optimal solution for Two Sum (LeetCode #1) using the Hash Map pattern. Brute force O(n²) vs hash map O(n) comparison, complexity analysis and Python implementation.

Feb 15, 2026
4 min
🟢 Beginner
#leetcode#hash-maps#python+3
DB
Tech Watch

Personal technical blog documenting my learning in software engineering, cloud computing and artificial intelligence.

Quick Links

  • Blog
  • Labs
  • DSA
  • Projects
  • About

© 2026 Daniel Beni Niyobuzima. All rights reserved.

Built with Next.js, TypeScript and Tailwind CSS