这段代码应该实现排序。
我有 3 个错误:
“StdRandom 无法解析”,
“无法解析标准输出”,
“无法解决插入问题”。
可能有一些库需要导入?
public class randomDoubles
{
public static void main(String[] args)
{
int N = Integer.parseInt(args[0]);
Double[] a = new Double[N];
for(int i = 0; i < N; i++)
a[i] = StdRandom.uniform(); // error: StdRandom cannot be resolved
Insertion.sort(a); // error: Insertion cannot be resolved
for (int i = 0; i < N; i++)
StdOut.println(a[i]); // error: StdOut cannot be resolved
}
}
最佳答案
关于java - StdRandom、StdOut、插入无法解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12770063/