240 发简信
IP属地:伊利诺伊州
  • Array Partition (k groups) for Sum or Average

    这类题,dp数组总长度要加1,表示前n个数的最优值 ·1043. Partition Array for Maximum Sumhttps://...

  • Binary Tree Traversal 小结

    本文总结了tree的三种traversal方式, 三种都用到stack。而且只有在inorder的时候while condition有所不同 I...

  • Binary Tree Pruning 小结 (Leetcode 814, 669, 1325)

    在做pruning时,需要用到以下template: sample code for leetcode 814:https://leetcode...

  • Bit Manipulation Summary

    来总结一下Bit Manipulation的一些常见操作: 将第n位bit 设为1: 将第n位bit 设为0: 将第n位bit toggle: ...

  • Tree Traversal 总结

    本文总结一下几种tree traversal的形式,都是用iterative的方式。而且基本是stack Preorder traversal ...

  • row_vector and col_vector的建立 (Leetcode 807, Leetcode 531)

    这两道题都需要建立row_vector and col_vector, 来统计每一行和每一列的信息。 Leetcode 807:https://...

  • Custom Sort String (Leetcode 791)

    A家的题。 解法1直接sort, 解法二:记下string T中每个char的个数,然后再loop S, 按照S的顺序recover出来 cla...