算法学习week1

2020-12-04  本文已影响0人  打出了枫采

第一周过去都快一个月了,做一点回顾记录。

“ I will, in fact, claim that the difference between a bad programmer and a 
good one is whether he considers his code or his data structures more 
important. Bad programmers worry about the code. Good programmers 
worry about data structures and their relationships. ” 
— Linus Torvalds (creator of Linux) 

1. 一些体会

2. 重要点回顾记录

Total memory usage for a data type value:
・Primitive type: 4 bytes for int, 8 bytes for double, 
・Object reference: 8 bytes.
・Array: 24 bytes + memory for each array entry.
・Object: 16 bytes + memory for each instance variable 
  + 8 bytes if inner class (for pointer to enclosing class).
・Padding: round up to multiple of 8 bytes.
image.png

3. 第一周的作业,经过反复调试快一天最终满分了

最开始只使用了一个顶部虚拟点,一直无法达到其中性能用例的要求,最终性能达到要求时,使用了两个虚拟的点,一个与顶部相连,一个与底部相连,当存在一个点,既与虚拟顶点和虚拟底点相连,则顶部与底部相通,可以渗透


image.png
上一篇 下一篇

猜你喜欢

热点阅读