Code: Select all
for(int i = 0; i < num; ++i)
{
do something;
}
Code: Select all
do something;
Graphed, you can see the difference. Here are some links to what these algorithm types look like graphed
Code: Select all
for(int i = 0; i < num; ++i)
{
do something;
}
Code: Select all
do something;
Yep. I am trying to make most of my system use O(1) algorithms, hoping that might be useful if I decide to support hard real time, and is altogether better for performance.neon wrote:Hi,
This is what I like about free stacks as they can be written as O(1).