polynomial vs non time complexity - Search