Leetcode # 146. LRU Cache

https://leetcode.com/problems/lru-cache Solution Time Complexity: O(capacity) Space Complexity: O(capacity) (The input and output generally do not count towards the space complexity.) class LRUCache: ...

         続きを読む

Leetcode # 13. Roman to Integer

https://leetcode.com/problems/roman-to-integer Solution Time Complexity: O(len(s)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) class Solution: de ...

         続きを読む

Leetcode # 283. Move Zeroes

https://leetcode.com/problems/move-zeroes Solution Time Complexity: O(len(nums)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) class Solution: def ...

         続きを読む
1 ... 33 ... 56
Bitnami