N But it's definitely not one and in fact it wasn't N in the case of Selection Sort because remember the algorithm we implemented on stage last week had me going back and forth across the stage selecting on iteration, the smallest person I can find, the smallest number and then putting them into place.
但在选择排序中,肯定不会是1,也不是,注意,上周我们在这儿,实现的算法中,反复地,迭代进行选择,选出最小的数,然后将其放在合适的位置。
In the case of Nimes, N-I-M-E-S, which was largely a Protestant town, they knocked down the wall so the Protestants of Nimes could not defend themselves against this all-conquering Catholic monarch.
以尼姆为例,那儿曾经是一座新教徒的城市,但统治者们拆毁了围墙,所以新教徒们再也无法对抗,所向无敌的天主教统治者了
So I propose this as a new algorithm for sorting N elements and being 8 in this case or really a thousand in the case of the phonebook, or anything of larger size.
所以我提出一种新的算法,来解决N个元素的排序问题,在这个问题中N是8,在电话簿的问题中N是一千,或者是大规模的任何问题。
In the linear case, meaning in the unsorted case what's the complexity of this? k times n, right? Order n to do the search, and I've got to do it k times, so this would be k times n.
复杂度是多少?k的n次方,对吧?,在序列n中做搜索,要做k次,所以是k的n次方次,如果先排序后搜索。
Thank you. Sorry, I've got the wrong glasses on but you're absolutely right, and in case the rest of you didn't hear it, n squared.
我看不清,但你绝对是对的,你们其他人可能没听清,是n的平方。
应用推荐