From e45a37763d45aee267e92c8d29e89a7eaac5744e Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Thu, 23 Jul 2020 17:28:45 -0400 Subject: [PATCH] fix absolute value --- hashing/chaining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashing/chaining.cpp b/hashing/chaining.cpp index ea4720475..0bc7df0eb 100644 --- a/hashing/chaining.cpp +++ b/hashing/chaining.cpp @@ -135,7 +135,7 @@ int main() { std::cout << "Enter element to add = "; std::cin >> x; h = mychain.hash(x); - h = std::fabs(h); + h = std::abs(h); mychain.add(x, h); break; case 2: