Built-in function process time
I wonder does built-in function sort of like .Sort in c# and .max arr in python giving you same processing time like 0(n) same like you do in DIY (do it yourself) method?
You can test these things by yourself, measuring performance time with tools like (Python) time.timeit or time.perf_counter. I once made an iterative binary search and wanted to see if it was as quick as the keyword 'in'. Well, it was quick - but not quite as quick. The built-in stuff (again Python) is written in C and optimized. You write your own methods in Python, so there'll be always a bit of overhead you can't control (unless you write your own extensions). Probably, if there is a built-in solution in a higher language, it will frequently be the best choice. But if you cook up performance tester codes here, let me know, those are always fun to see. :)
I'm not totally fit in the O notation stuff, but it is a relative measurement, isn't it? If you code a specific algorithm in two variations, then the algorithm may in absolute terms run more quickly, because it uses built-in tools, but the steps to get there would be the same, because it's the same algo. Like two persons walking 100 steps, but one has slighly longer legs. It's the same algo (put one foot in front of each other, always keeping one foot on the ground) so it would have the same O-notation, but the longer legs give an advantage anyway. I hope this is 1 correct and 2 understandable.
HonFu ty for answer, this question based on someone gave python code with loops but still have built in function there and claims its 0(n), so i wonder does built in function not giving you an any N times.
HonFu yes ty me understand, im totally new in python so because of his code i just assuming maybe python have very good built in function (sort of instant access array) so i discussing it here 😅
Python is definitely convenient, but it is slower than for example C. The convenience comes at a price. When performance speed isn't the most important consideration, then a language like Python may allow you to write programs more quickly and easily. But that's practical issues and hasn't much to do with O notation stuff in my opinion (unless you compare the inner workings of the languages themselves).
Please help me with HTML
What is the mistake here?
Unable to overload +
I have tried every way I could find but still I can't display my local images ..what am I doing wrong?
Pls rectify the errors.