/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Swap.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/01/09 14:08:45 by bchanot #+# #+# */ /* Updated: 2026/01/09 15:26:46 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef SWAP_HPP # define SWAP_HPP # include # include template < typename T > void swap(T &x, T &y) { T temp; temp = x; x = y; y = temp; } template < typename T > T min(T const & x, T const & y) { return (x < y ? x : y); } template < typename T > T max(T const & x, T const & y) { return (x > y ? x : y); } #endif