我想找到两个文件(大文件)之间的公共线,一个有9000万行,1个有100万个,还有它们的行号.
comm -12 file1 file2
给了我公共线,但我想知道各个文件中的行号
bash shell
我正在研究空间和时间的复杂性,并遇到了这个问题
O(n +(n/2 + n/4 ...... n/n))= O(n + log(n)).
我没弄明白这是怎么回事?任何人都可以提供一些见解吗?
algorithm math big-o
algorithm ×1
bash ×1
big-o ×1
math ×1
shell ×1