清单8:一个复杂元素类型。
其实它只是一个复杂元素的集合,每个复杂元素都描述一个组件的详细信息。
Instead, it is just a collection of complex elements, each of which describes the details of each component.
对于包含复杂元素以及此类复杂元素的巨大列表的响应,手动验证工作量可能会非常大。
For responses which contain complex elements and a huge list of such complex elements, manual verification can require much more effort.
And so, I get some power. I get the ability to store arbitrary things, but what just happened to my complexity?
但是复杂度变了,找到第k个元素,要花多少时间呢?
I've got to count my way down, which means that the access would be linear in the length of the list to find the i'th element of the list, and that's going to increase the complexity.
的位置并去访问,然后继续下去,也就意味着,找到数组中的第i个元素的方法,是关于数组的长度呈线性复杂度的,这回增加算法的复杂度。
应用推荐