LeetCode: 3-Longest Substring Without Repeating Characters 解題紀錄
題目
Given a string s, find the length of the longest substring without repeating characters.
Read More »LeetCode: 3-Longest Substring Without Repeating Characters 解題紀錄Given a string s, find the length of the longest substring without repeating characters.
Read More »LeetCode: 3-Longest Substring Without Repeating Characters 解題紀錄You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.
You may assume the two numbers do not contain any leading zero, except the number 0 itself.
Read More »LeetCode: 2-Add Two Numbers 解題紀錄Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.Read More »LeetCode: 1-Two Sum 解題紀錄
map 是 C++ 標準模板函式庫(Standard Template Library, STL)中的關聯容器(Associative Container),也就是存在著 key-value 這樣對應關係的一種容器。
Read More »[C++] STL 中的 map 筆記deque 是 C++ 標準模板函式庫(Standard Template Library, STL)中的雙向佇列容器(Double-ended Queue),跟 vector 相似,不過在 vector 中若是要添加新元素至開端,其時間複雜度為 O(N),但在 deque 中則是 O(1)。同樣地,也能在我們需要儲存更多元素的時候自動擴展空間,讓我們不必煩惱佇列長度的問題。
Read More »[C++] STL 中的 deque 筆記string 是 C++ 標準模板函式庫(Standard Template Library, STL)中提供的字串容器,跟原本的 char 相比,可以輕鬆做到比較繁瑣的字串操作。
Read More »[C++] STL 中的 string 筆記vector 是 C++ 標準模板函式庫(Standard Template Library, STL)中的序列容器(Sequence Container),跟 Array 十分相似,但是可以在我們儲存更多元素的時候自動擴展空間,在寫程式時利用起來十分便利。
Read More »[C++] STL 中的 vector 筆記函式(function)是能夠將程式中不同功能的程式碼切分得更精細的模組,並在需要時透過呼叫函式來反覆利用已經寫好的程式碼。
Read More »[C++] 基本教學 07: 函式(function)指標(Pointer)是 C++ 中一種儲存變數記憶體位址的資料型態,經常用於構建 Linked List 之類的結構或是用來傳遞大資料的記憶體位址從而提升程式效率。是使用『星號』(*)來宣告。
Read More »[C++] 基本教學 06: 指標、參考符號