Hi,
I am trying to understand big oh notations. Please correct me.
Say there is a program that accesses a file on disk randomly and say the size of the file n.
So, the big oh notation for this program is O(n) this is because it may access the file randomly at n positions. However, there is a possibility that the program assess the data for the file from the cache but lets ignore this for now.
If the program accesses the file sequantially (one after the other), the big oh notation is O(1).
Is this right ?
Thank you very much.
O(n) time to access all of the file.