637. Average of Levels in Binary Tree 这道题比较简单,只需要对 tree 进行 level traversal 的同时,计算每层的 av...

637. Average of Levels in Binary Tree 这道题比较简单,只需要对 tree 进行 level traversal 的同时,计算每层的 av...
这次完全忘记参加了。 643. Maximum Average Subarray I 比较容易,直接计算 length 为 k 的 subarray 的平均值,扫一遍整个 a...
1. 前缀,后缀和中缀之间相互转换 中缀表示转前缀/后缀(附代码)针对负数的情况前缀/中缀/后缀相互转换 2. Tree Traversal wikisuccessor, p...
645. Set Mismatch 这道题只需确保 i 位置上的数满足 nums[i]==i+1,通过不断换位置即可。 time complexity: O(n), spac...