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?
这里,要关注的,两个变量是列表,的长度以及我要搜索的次数,这种情况下,这个算法赢了?
I have not checked the length of the variable called nan.
没有检查变量的长度。
N So, I'm initializing a variable called N to the string length of s1.
我初始化一个变量,等于s1的字符串长度。
应用推荐