Add binary tree and binary search tree

This commit is contained in:
2024-07-16 12:03:46 +08:00
parent 7d466865f5
commit 4321573b29
6 changed files with 310 additions and 3 deletions

View File

@@ -146,6 +146,8 @@ set(SOURCE_FILE_HEADERS
stack.h
linked_stack.h
circular_queue.h
binary_tree.h
binary_search_tree.h
)
if (NOT HAVE_STRPTIME)
@@ -195,7 +197,7 @@ if (ENABLE_UTILS_TESTING)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
add_subdirectory(googletest)
enable_testing()
add_executable(unittest test/stack_test.cpp test/queue_test.cpp)
add_executable(unittest test/stack_test.cpp test/queue_test.cpp test/binary_tree_test.cpp)
target_link_libraries(unittest GTest::gtest_main utils)
include(GoogleTest)
gtest_discover_tests(unittest)