Ali fought all the top contenders in his prime, sometimes he lost, but he fought them. I didn't really see him in his prime, but I remember seeing him in later fights as a kid in the late 70's, and watching older fights he was in... He was the greatest.
I won't go too deep into my opinion of Tyson, but Tyson ducked a lot of fighters in his prime between 1988 and 1992 when he went to prison... The whole Razor Rudduck thing was a travesty, Rudduck was a VERY different fighter in 1989 than he was in 1991, and Tyson was supposed to fight him in November of '89, but instead of fighting him, Tyson pulled out days before the fight, and instead of rescheduling THAT fight, he opted to fight a 40-1 underdog in a fight put together a month or so earlier, there was little doubt in A LOT of boxing analysts minds that Rudduck would have won that fight after they saw Tyson in the Douglas fight, and they were already claiming he faked the illness, as no one wanted to fight Ruddock, including other huge heavyweights like Bowe. A fighter like Ali would have totally threw Tyson off his game, because Tyson was all about intimidation, intimidation was his strength, he had most guys beaten while they were still in training for their fight, and if they weren't they done when Tyson walked through the ropes, just look at Michael Spink's face. But the intimidation was a facade, his weakness was his very real lack of confidence, he has since openly admits that he used to cry before his fights because he was always afraid he'd lose. All Tyson had to do to lose was eventually get in the ring with someone strong enough to take his punch, good enough to box with him, and most importantly was not intimidated by him, this is a guy who only had 5 fights in 50 wins end in a decision, 50 wins and 44 KO's. Douglas was not intimidated by him at all, and Holyfield owned him, if the fighter could remain confident as well as get up from a hard knock down or not get knocked down at all, to the best of my knowledge Holyfield is the only opponent he never knocked down, then you have a chance to win. Ali would have never been intimidated by Tyson, because Ali genuinely believed he was in fact the very best there was, and always took a loss in stride, he was stong enough to knock out a big heavyweight and could take a big punch, more importantly he avoided the big punch as well.
Ali was the greatest.