Question d’entretien chez Walmart

Design an algorithm that traverses through the 4 points of a rectangle