https://leetcode.com/problems/isomorphic-strings/ Solution Time Complexity: O(s.length()) Space Complexity: O(s.length()) class Solution { public: bool isIsomorphic(string s, string t) { std::map<c ...
https://leetcode.com/problems/merge-sorted-array/ First Solution 從尾到頭逆著做回來 Time Complexity: O(m + n) Space Complexity: O(1) class Solution { public: void merge(vector& nums1, int m, vector& nu ...
Hash table in C++ 初始化 std::set<template> s; std::set<template> s{…}; template arr = {…}; std::set<template> s(arr, arr + {length of arr}); — std::map<template_ke ...
for(range_declaration : range_expression){ loop_statement } 範例 用 range based for loop 存取 vector for(int y : x)cout << y << " "; cout << endl;
C++ 中的 sum() template<class InputIt, class T> (constexpr) T accumulate(InputIt first, InputIt last, T init(, BinaryOperation op)); frist, last range 為 [first, last) init initial value op 預設為 plu ...
開新 screen screen [-S {screen_name}] 顯示目前執行中的所有 screen screen -ls 復原至指定 screen screen -r {screen_id} 結束screen 結束目前所在 screen exit 結束所有 screen pkill screen
vi/vim nano
確認命令來源 type pythonX type -a pythonX (查 alias(別名)) 用 update-alternatives 切換 安裝自定選項 sudo update-alternatives --install /usr/bin/pythonX pythonX /usr/bin/pythonX.Y 300 ※ 300為優先度,數值越高優先度越高 查看 update-alter ...
sudo apt install python3-distutils 已經安裝python3-distutils ⇒ sudo apt install python3.X-distutils
誰在懸崖沏一壺茶 溫熱前世的牽掛 而我在調整千年的時差 愛恨全喝下 歲月在岩石上敲打 我又留長了頭髮 耐心的等海岸線的變化 大雨就要下 風 狠狠的刮 誰 在害怕 海風一直眷戀著沙 你卻錯過我的年華 錯過我新長的枝枒 和我的白髮 蝴蝶依舊狂戀著花 你卻錯過我的年華 錯過我轉世的臉頰 你還愛我嗎 我等你一句話 一生行走望斷天崖 最遠不過是晚霞 而你今生又在哪戶人家 欲語淚先下 沙灘上消失的浪花 讓我慢 ...