[Leetcode] two sum decorators

A decorator is just a callable that takes a function and returns a new one, often a wrapper, letting us extend behavior while keeping functions clean and following the Open–Closed Principle.

Coding

[Leetcode] two sum type annotation

Several examples are presented to clarify the definition and application of type annotations in Python.

Coding

[Leetcode] two sum

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

Coding