以下关于列表p内元素排序程序的时间复杂度为?( )
for a in range(n-1): for b in range(n-1-i): if(p[b]<p[b+1]): tmp=p[b] p[b]=p[b+1] p[b+1]=tmp
O(n)
O(nlogn)
O(n^2)
O(n^3)