原创 [LeetCode] 1. Two Sum 兩數之和

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may a

原创 [LeetCode] Add Two Numbers 兩個數字相加

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse o

原创 [LeetCode 19] Remove Nth Node From End of List 移除鏈表倒數第N個節點

Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list:

原创 C++函數模板詳解

模板(Template)指C++程序設計設計語言中採用類型作爲參數的程序設計,支持通用程序設計。C++ 的標準庫提供許多有用的函數大多結合了模板的觀念,如STL以及IO Stream。模板是C++支持參數化多態的工具,使用

原创 理解C++中的左值和右值

理解C++中的左值和右值 Attention:this blog is a translation of https://www.internalpointers.com/post/understanding-meaning-lv

原创 LeetCode] 189. Rotate Array 旋轉數組

Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: [1,2,3,4,5,6,7

原创 [LeetCode63] Valid Number 驗證數字

Validate if a given string can be interpreted as a decimal number. Some examples: “0” => true " 0.1 " => true “abc”

原创 1.1 Unique Characters of a String 字符串中不同的字符

1.1 Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional da