From 73e1092f5cb40ff8cb31dacba23299e3f1084a38 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 6 Nov 2023 23:08:05 -0500 Subject: [PATCH] adding happy number problem --- .../11_hash_tables/{test_happy_number.cpp => happy_number.cpp} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename labs/11_hash_tables/{test_happy_number.cpp => happy_number.cpp} (82%) diff --git a/labs/11_hash_tables/test_happy_number.cpp b/labs/11_hash_tables/happy_number.cpp similarity index 82% rename from labs/11_hash_tables/test_happy_number.cpp rename to labs/11_hash_tables/happy_number.cpp index 4b0b1a6..260c5dc 100644 --- a/labs/11_hash_tables/test_happy_number.cpp +++ b/labs/11_hash_tables/happy_number.cpp @@ -1,5 +1,4 @@ #include -#include bool isHappy(int n) { } @@ -9,7 +8,7 @@ int main() { // 2, 4, 5, 6, 17, 18, 20 are not happy numbers. // 1, 7, 10, 13, 19, 23, 28, 68 are not happy numbers. - int testCases[] = {2,4,5,6,17,18,20,68,1,7,10,13,19,23,28}; + int testCases[] = {2,4,5,6,17,18,20,1,7,10,13,19,23,28,68}; for (int n : testCases) { if (isHappy(n)) {