title: Always O(1) is better than O(n) in algorithm time complexity?
body: <p>I am asking that just think for a moment if I have an algorithm which is taking O(100) ---->O(1) time complexity and I have an algorithm for the same problem which takes O(n) to solve but if I know that it's n's maximum value is 50 then I can decide it's worst case is O(50) so in a case like this still O(1) algorithm or the second O(n) algorithm is the best choice? So if it's the second one, can we always tell O(1) is better than O(n) ?</p>