现要对n个实数(仅包含正实数和负实数)组成的数组A进行重新排列,使得其中所有的负实数都位于正实数之前。求解该问题的算法的伪代码如下所示,则该算法的时间和空间更杂度分别为( )。
i=0;j=n-1;
while i<j do
while A[i]<0 do
i=i+1;
while A[j]>0 do
j=j-1;
if i<j do
交换A[i]和A[j];
问题1选项

根据程序不难看出,要将负实数位于正实数之前,其实就是对所有元素进行了一次遍历,正实数和负实数互换位置即可,因此其时间复杂度为O(n),由于元素A[i]和A[j]互换时,需要一个临时存储空间来存放元素,因此其空间复杂度为O(1)。
( )is the process of transforming information so it is unintelligible to anyone but the intended recipient.
As each application module is completed,it undergoes( )to ensure that it operates correctly and reliably.
( )algorithm specifies the way to arrange data in a particular order.
After analyzing the source code,( )generates machine instructions that will carry out the meaning of the program at a later time.
( )can help organizations to better understand the information contained within the data and will also help identify the data that is most important to the business and future business decisions.
浏览器开启无痕浏览模式后,( )依然会被保存下来。
下列协议中,不属于TCP/IP协议簇的是( )。
下列传输介质中,带宽最宽、抗干扰能力最强的是( )。
数控编程常需要用参数来描述需要加工的零件的图形。在平面坐标系内,确定一个点需要2个独立的参数,确定一个正方形需要( )个独立的参数。
某书的页码为1,2,3,...,共用数字900个(一个多位数页码包含多个数字),据此可以推断,该书最大的页码为( )。