Graph for big O complexity using dev c++ or codeBlocks? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Graph for big O complexity using dev c++ or codeBlocks?

26th Oct 2016, 6:50 PM
S ss
S ss - avatar
4 ответов
+ 1
Do I understand you right: you want to classify and display a function using big O? What function would that be or how is it represented in the program?
26th Oct 2016, 11:06 PM
Stefan
Stefan - avatar
0
I need to display as a graph the complexity of some sorting algorithms written on the ide, such as insertion sort and quick sort! I saw on youtube that dev ide has a graphic interface and it can be used when adding a graphic library, but they used only a sine function example
27th Oct 2016, 7:02 AM
S ss
S ss - avatar
0
So the time function should best be known to you before you can classify and draw it. If it's not, you would have to run the algorithm, vary the right parameters and measure time for the input. And then you only have the values that the time function would return... Measuring the time might also cause problems as you might encounter the Halteproblem (halting problem) and you might have a hard time to decide when a run of the algorithm is just not finished or it crashed... Apart from that, not having the time function explicitly written down, complicates finding the big O quite a bit. I hope you see that the problems you have to solve in order to reach your goal are quite severe and go (far) beyond SoloLearn C++.
27th Oct 2016, 8:33 AM
Stefan
Stefan - avatar
0
Thank you so much Stefan for your detailed answer, I was thinking of the necessity to use the time function and that's wht you are clearly pointing at! It's true that my problem is beyond Sololearn but I knew there'd be great programmers here that's why I asked. Thanks again have a good day!
27th Oct 2016, 2:08 PM
S ss
S ss - avatar