👉 Swaps, in computer science and particularly in graph theory, refer to a type of permutation that reverses every edge between two vertices in a directed graph. This operation is often used in algorithms and data structures designed to find shortest paths or to perform certain graph operations efficiently. A swap (or transposition) is an edge transformation where the original vertex becomes the new vertex. For example, if there are two vertices A and B, swapping them would change the graph from a cycle (with all edges