Your bike must be built to fit your x-seam. The bike frame should be long enough so that when your foot pushes the pedal to its most forward position, your leg will be fully extended.
The other important consideration is comfort. The seat must be comfortable. You must be sure nothing touches your legs as you pedal.
Good luck.