👉 In computer science, a pair is a type of object in a data structure. It represents two related elements or variables that are connected by a reference to each other. For example, a pair can represent an individual's name and their phone number, where the name is stored as a member variable and the phone number is stored as another member variable.