[Leetcode] two sum decoratorsA 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.2025-11-13Coding
[Leetcode] two sum type annotationSeveral examples are presented to clarify the definition and application of type annotations in Python.2025-11-10Coding
[Leetcode] two sumGiven an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.2025-11-07Coding
c++ debug notesLink Against the GSL Libraries When we compile code with GSL, we need to tell the linker to include the GSL libraries. For ex...2025-04-14Coding
note for python ILambda function Lambda functions in Python are small, anonymous functions defined with the lambda keyword rather than with th...2025-04-14Coding
casting operatorsthe c++ casting operators the four c++ casting operators are static_cast dynamic_cast reinterpret_cast const_cast use stati...2024-06-23Coding
operator type and overloading -part IIImove constructor and move assignment operator Take a look at the addition operator + as implemented in demolist12_4. Notice t...2024-06-22Coding
operator type and overloading -part IIbinary operators operators that function on two operands are called binary operators. syntax : 1return_type operator_type (pa...2024-06-21Coding
operator type and overloading -part Ion a board level, operators in c++ can be classified into two type: unary operators and binary operators. unary operators ope...2024-06-20Coding
polymorphism -3specifier override to indicate intention to override Assume that you want override the Fish::Swim in Derived class but with a...2024-06-19Coding