M
mathon
hello,
i have a question regarding time analysis, respectively calculating the
Big O. For example when i have this function:
Does there exist an easy concept how i can calculate the Big O for the
previous function for example...?
matti
i have a question regarding time analysis, respectively calculating the
Big O. For example when i have this function:
Code:
void sequence::attach(const value_type& entry)
{
if(!(is_item()))
{
cursor = tail_ptr;
}
if(cursor == NULL)
{
list_head_insert(head_ptr, entry);
cursor = head_ptr;
tail_ptr = head_ptr;
}
else
{
list_insert(cursor, entry);
precursor = cursor;
cursor = cursor->link();
}
++many_nodes;
node* cursor1;
node* precursor1;
for(cursor1 = head_ptr; cursor1 != NULL; cursor1 = cursor1->link())
{
precursor1 = cursor1;
}
tail_ptr = precursor1;
}
Does there exist an easy concept how i can calculate the Big O for the
previous function for example...?
matti