我不是CS背景的人,我试图弄清楚什么是用来做什么的。
for i <--- 1 to n-1 do
j <--- find-Min(A,i,n)
A[j] <-> A[i]
end for
我不是CS背景的人,我试图弄清楚什么是用来做什么的。
for i <--- 1 to n-1 do
j <--- find-Min(A,i,n)
A[j] <-> A[i]
end for
<强度 > EDIT 强度 > :
我突然想到第一行可能缺失 i
,改为:
for i <--- 1 to n-1 do
这成为了上述 >
是从 1
到 的指定值, 依次是
> n-1
,循环体(下至 end for
,它表示循环的结束)为这些 >
的每一个值执行。
关于伪编码中使用的标记,目前还远远没有达成普遍一致。
在此情况下我猜想
但是,在第一种情况下,我认为你错过了一个角色。它可能应该是:
for i <--- 1 to n-1 do
所以它是一个普通的 环的 代码, 以下列方式写入 :
for i = 1 to n-1
BASIC中,或:
for (i=1; i<n; i++)
以C类语言写成。
用于表明变量收到一个新的值,例如:
for i <- 1 to n-1 do
我从以下几个方面看到这一点:
也用来使行动以象征性的方式显露出来。
我现在除了假代码什么都想不出来
I have a triangulated isometric grid, like this: (source: mathforum.org) In my code, triangles are grouped by columns. As I hover the mouse, I want to calculate what triangle the mouse coordinates ...
How can I randomly generate letters according to their frequency of use in common speech? Any pseudo-code appreciated, but an implementation in Java would be fantastic. Otherwise just a poke in the ...
Can somebody help get the following pseudocode in mysql? The resulting selects in the IF statement all return the same columns (4) and multiple rows (unknown) so that s not really the problem i m ...
I am trying to write a program that inputs a positive number less than 10 and outputs the sum of the first numbers. For example 5 would be 5+4+3+2+1. The commands are Stop, Load, Store, Add, Sum, ...
I m working on an application where I need to automatically schedule jobs for members on a rotating schedule. I m not very good at explaining rules, so here s some data to help out: Positions: A job ...
I m trying to implement this extenstion of the Karplus-Strong plucked string algorithm, but I don t understand the notation there used. Maybe it will take years of study, but maybe it won t - maybe ...
I am pretty good with Python, so pseudo-code will suffice when details are trivial. Please get me started on the task - how do go about crawling the net for the snail mail addresses of churches in my ...
Ok, my situation is this I have a list of items and I need to get the order of these items based on the references they have. For example lets say we have these items: A,B,C,D,E,F C and D have no ...