Both are needed to experience the full dimensions of the practice. If you have the opportunity to meditate with others—or even with one other person—then you should take it, because mutual support only helps, and meditating with others can also reveal new depths of meditation through the subtle “field” of consciousness that is generated between everyone. But don’t become so dependent on the support of others that you begin to lose your own independent strength and autonomy in the practice.
Often you’ll find it more tempting to scratch an itch or move around on your cushion when you know that no one is looking and you won’t be disturbing anyone but yourself. But learning to independently maintain your own internal resolve, willpower, and stillness when you’re all alone is a guaranteed way to build deep self-confidence and self-reliance through the practice of meditation.