For any nucleotide sequence, the 5' end is the one where the nucleotide contains a phosphate group (-PO₄) attached to the 5' carbon of the pentose ring.
While the 3' end will corresponds to the nucleotide that has a hydroxyl group (-OH) attached to the 3' carbon of the pentose ring.
Just knowing which nucleotides form the sequence is no enough to determine which is the 5' end and which is the 3' end, you need to know the molecular structure of the bases at both ends to be able to determine it.