Problem https://leetcode.com/problems/find-the-maximum-number-of-fruits-collected Solution: Bottom-Up DP (Tabulation) The children will make exactly n - 1 moves to reach the room (n - 1, n - 1) ⇒ chil ...
Problem https://leetcode.com/problems/find-smallest-common-element-in-all-rows Solution: Binary Search Time Complexity: O(len(mat) * log(len(mat[0]))) Space Complexity: O(1) (The input and output gene ...
Problem https://leetcode.com/problems/power-of-two Solution Time Complexity: O(log(n)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) class Solution ...
Problem https://leetcode.com/problems/binary-tree-vertical-order-traversal Solution: BFS Time Complexity: O(len(tree)) Space Complexity: O(len(tree)) (The input and output generally do not count towar ...
Problem https://leetcode.com/problems/fruit-into-baskets Solution: Sliding Window Time Complexity: O(len(fruits)) Space Complexity: O(1) (The input and output generally do not count towards the space ...
chrome://settings/content/all
アカマタ・クロマタ
喔愛 什麼是愛 你看我的眼神那會這麼可愛 若是講你的心親像大海 我也會甘願 為了你暈船 喔喔喔愛 什麼是愛 你看我的眼神甘嘸一絲絲愛 真想欲在這個花花世界 帶你去一個 溫暖的所在 Oh~ Now I just want hold you tight, oh baby don’t cry. I miss you in this rainy night. I’ll show you the best ...
Problem https://leetcode.com/problems/k-empty-slots What I Tried [Time Limit Exceeded 27 / 61 testcases passed] Time Complexity: O(len(bulbs) ** 2) Space Complexity: O(len(bulbs)) (The input and outp ...
Problem https://leetcode.com/problems/find-all-k-distant-indices-in-an-array Solution Time Complexity: O(len(nums)) Space Complexity: O(1) (The input and output generally do not count towards the spac ...