C++/ordered list implementation in c++
can u plzz guide me with code for getting length of ordered but unsorted array in c++ in O(n) time complexity also plzz tel how to print and retrieve element from this in same O(n) time
To get the length of an array you can just check the length you specified it to be or you can traverse the array until you get the the end (e.g. A [ i ] = null).
The only way to print data from an array in O ( n ) time is to traverse the array printing its elements either from start to finish of from a specified element to another. If you want to print specific data you will have to note where that data is in the array and save it first and last element. Then you can just print from the first to the last element.