小编rsd*_*hed的帖子

从 Big O 粗略估计运行时间

如果我的程序的时间复杂度O(n^2),对于 n,10^6 的大值,我如何以秒单位表示运行时间?

我需要对此进行粗略估计以了解是否需要优化或者我可以继续我的代码....时间限制为 0.6 秒

问题不是关于时间复杂度的计算......而是关于从时间复杂度估计运行时间

algorithm big-o time-complexity

2
推荐指数
1
解决办法
2604
查看次数

Group items and find the top n% from each group

I have data in the below format. I've to find the sum of values of the top 25% in each group - grouped by ID.

If the number corresponding to the top 25% in a group is a fraction, give the data for the ceil(higher number) of that fraction

ID  Value
3   10
3   83
1   13
2   62
2   26
3   63
3   37
1   17
3   22
3   41
3   45
2   65
3   63
1   45
2 …
Run Code Online (Sandbox Code Playgroud)

group-by r dataframe

0
推荐指数
1
解决办法
52
查看次数

标签 统计

algorithm ×1

big-o ×1

dataframe ×1

group-by ×1

r ×1

time-complexity ×1