hello everyone I was wondering if anyone could explain big-oh estimate to me for c++ data structures. I do not understand it that much and does anyone know of any good websites that have good information on c++ data structures i would greatly appreciate it. Also could anyone explain to me how to use big-oh estimate on the following problem. My prof gave this to us at the end of class saying he would explain how to do solve it the next class day but i have no idea how to do this, would greatly appreciate anyones help. thanks. the following is what he gave us on a handout

    for(int i=1; i<n=10; ++i) 
        for(int j=10; j<n; ++j)
            cout<<i+j;   

this is how it is exactly written on the handout i ran it but it gives no answer so did my prof make a mistake or did he try to mean something else for n=10? Thanks to anyone that can help me out.

Recommended Answers

http://eternallyconfuzzled.com/arts/jsw_art_bigo.aspx

this is how it is exactly written on the handout

There's clearly a typo in the outer loop condition. i < n - 10 is probably what was intended.

Jump to Post

All 2 Replies

ok thanks you very much for the info and the site deceptikon. :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.