So when I do the analysis, I want to think about what am I doing here, am I capturing all the pieces of it? Here, the two variables that matter are what's the length of the list, and how many times I'm going to search it?
这里,要关注的,两个变量是列表,的长度以及我要搜索的次数,这种情况下,这个算法赢了?
应用推荐