Product of Array Except Self
LeetCode https://leetcode.cn/problems/product-of-array-except-self/
LeetCode https://leetcode.cn/problems/product-of-array-except-self/
相对于 ps 是撷取一个时间点的进程状态, top 则可以持续侦测进程运作的状态! 使用方式如下: top [-d number] | top [-bnp] Top display top - 10:19:24 up 2 days, 51 min, 1 user, load average: 0.94, 1.27, 1.51 Tasks: 522 total, 2 runn...
概述 想必在linux上写过程序的同学都有分析进程占用多少内存的经历,或者被问到这样的问题——你的程序在运行时占用了多少内存(物理内存)?通常我们可以通过top命令查看进程占用了多少内存。这里我们可以看到VIRT、RES和SHR三个重要的指标,他们分别代表什么意思呢?这是本文需要跟大家一起探讨的问题。当然如果更加深入一点,你可能会问进程所占用的那些物理内存都用在了哪些地方?这时候top命令...
LeetCode https://leetcode.cn/problems/number-of-1-bits/ class Solution { public int hammingWeight(int n) { int res = 0; while (n != 0) { res++; ...
OSI模型 理解两个词 ISO & OSI ISO International Organizational for Standardization 国际标准化组织 OSI Open System Interconnection 计算机通信开放系统互连 图解:OSI模型和网际协议族中的各层 描述一个网络中各个协议层的常用方法是使用国际标准化组织(Intermati...
LeetCode https://leetcode.cn/problems/daily-temperatures/ Complexity Time = O(n) Space = O(1)
LeetCode https://leetcode.cn/problems/climbing-stairs/ class Solution { public int climbStairs(int n) { if (n < 3) return n; int[] memo = new int[n]; memo[...
LeetCode https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/ class Solution { public int maxProfit(int[] prices) { if (prices == null || prices.length < 2) { r...
LeetCode https://leetcode.cn/problems/permutations/ class Solution { public List<List<Integer>> permute(int[] nums) { List<List<Integer>> results = new ArrayLis...
transient Entry<K, V>[] table = (Entry<K, V>[]) EMPTY_TABLE; static class Entry<K, V> implements Map.Entry<K, V> { final K key; V value; Entry<K, V> next...