Leetcode # 68. Text Justification
Problem https://leetcode.com/problems/text-justification Solution Time Complexity: O(len(words)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) clas ...
Problem https://leetcode.com/problems/text-justification Solution Time Complexity: O(len(words)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) clas ...
Problem https://leetcode.com/problems/reverse-string Solution Time Complexity: O(n) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) class Solution: d ...
Problem https://leetcode.com/problems/reorganize-string n := len(s) k := len(set(s)) find s’ := s'[i] != s[i + 1], i = 0, 1, 2, …, n – 1 Solution Time Complexity: O(n + k * log(k)) ...
Problem https://leetcode.com/problems/excel-sheet-column-title 1 → A 2 → B 3 → C … 26 → Z 27 = 1 * 26 + 1 → AA 28 = 1 * 26 + 2 → AB Solution Time Complexity: O(log(columnNumber)) Space Complexit ...
Problem Counpute len([i for i in range(n) if is_prime(i)]) https://leetcode.com/problems/count-primes First Solution (Time Limit Exceeded) 質數的定義 屬於自然數 ℕ (大於 0 ) 只有兩個正因數 ( 1 和自己) 驗證是否 n 為質數只需要驗證 [2, ⌊n ...
Routing in Flask FLUTTER_DIR = os.path.join(os.sep, ...) @app.route("/app/<path:path>", methods=['GET', 'POST']) def flutter(path): path_ = path.split("/") if len(path) < 2: abort(404) projec ...
Ownership & Permissions 參考 查看權限 Ownership User (Owner) Group Others Permissions Read Write Execute Commands 群組與使用者相關操作 查看使用者所屬群組 cat /etc/group | grep {username} 新建群組 sudo addgroup {group_name} 刪除 ...
~/.ssh/config Host ... HostName ... User ... IdentityFile .../....pem Username in EC2 Instance Amazon EC2: Manage users on your Linux instance – Default user names
lib/main.dart This file contains the main entry point and the application widgets. lib/config.dart This file contains the environment settings. pubspec.yaml This file contains the package configurati ...