[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

c++ debug notes

Link Against the GSL Libraries When we compile code with GSL, we need to tell the linker to include the GSL libraries. For ex...

Coding

note for python I

Lambda function Lambda functions in Python are small, anonymous functions defined with the lambda keyword rather than with th...

Coding

casting operators

the c++ casting operators the four c++ casting operators are static_cast dynamic_cast reinterpret_cast const_cast use stati...

Coding

operator type and overloading -part III

move constructor and move assignment operator Take a look at the addition operator + as implemented in demolist12_4. Notice t...

Coding

operator type and overloading -part II

binary operators operators that function on two operands are called binary operators. syntax : 1return_type operator_type (pa...

Coding

operator type and overloading -part I

on a board level, operators in c++ can be classified into two type: unary operators and binary operators. unary operators ope...

Coding

polymorphism -3

specifier override to indicate intention to override Assume that you want override the Fish::Swim in Derived class but with a...

Coding
123