confusion with worst case for direct addressing In CLRS there is an exercise for direct address table


  Suppose that a dynamic set S is represented by a direct-address table
  T of length m. Describe a procedure that finds the maximum element
  of S. What is the worst-case performance of your procedure?


for this question i have seen a lot of websites indicating the worst case possibility is O(m) by starting and examining every non null slot up to end and then returning the maximum index,
but i think it can be done in a faster way than that.
 If direct addressing tables has m slots , then obviously the highest value should be in the end (i thought keys are treated as indexes in direct addressing,correct me if i am wrong) , so if we start iterating from the end then worst case would be O(m-n) where n is the number of elements examined by our iterator before reaching  non null value from end of the direct addressing table

is something wrong with my approach? Can any one clear this topic?
When iterating from start to end, you always need to examine $m$ items, which is $O(m)$.
When iterating from end to start, in the worst case you need to examine $m - |S|$ items, then the answer depends on the relationship between $|S|$ and $m$. 

If $m - |S|$ is const., it takes $O(1)$ time.
Otherwise since $0 \leq |S| \leq m$, we have $m - |S| \leq m$, the upper bound is also $O(m)$. 

Then in either cases, as long as $m - |S|$ is not const., both approaches have $O(m)$.