Maze Solver Robot - Line vs Wall

Hi! I am thinking of ordering a chassis for my arduino in order to create a maze solver robot.
My question is: what is better, a line following robot or a wall detection (using ultrasonic sensor)?
Is one easier than the other or they have the same level of difficulty?
Also I think that if I select the line method bigger maze can fit in the same space. Am I right?

Thanks for your time. I'm waiting for discussion

If your maze is a painted line or tape on the floor, then a wall following sensor isn't going to work! And if your maze has walls then there may not be a line to follow.

A maze made of walls or lines does not make it more or less difficult. Its the topology of the maze that does that.

Constructing a maze of lines is probably easier and cheaper in materials. But it won't prevent the robot from "cheating" either accidentally or intentionally, like walls do.

Most ultrasonic sensors may not be suitable for a walled maze. They don't work as well over very short distances. A "time of flight" sensor using ir light might be better.

Programming a robot to solve any maze can be an immensely difficult task that will keep you occupied for years. There are simple algorithms, such as "follow the left wall" which would be a good place for a beginner to start. But there are maze topologies that cannot be solved by such a simple algorithm, so once you have the hardware and the basic algorithm working, there will be more challenges to look forward to (probably mostly software enhancements, although you may find that the more complex algorithms will need a faster Arduino board with more ram and flash).