Skip to content

Conversation

@monkey0722
Copy link
Owner

This pull request introduces significant enhancements to the codebase, including the addition of Kruskal's algorithm and binary search implementations, along with their corresponding unit tests. It also updates the VSCode configuration files for improved development environment settings.

Algorithm Implementations:

  • Kruskal's Algorithm (src/graph/kruskal.hpp): Added a complete implementation of Kruskal's algorithm for finding the Minimum Spanning Tree (MST), including a KruskalEdge structure, a DisjointSet class, and utility functions like isConnected.
  • Binary Search (src/search/binary_search.hpp): Introduced a namespace clavis::search with multiple binary search methods, including standard binary search, lower/upper bounds, and predicate-based search, all using modern C++ concepts.

Unit Tests:

  • Kruskal's Algorithm Tests (tests/graph/kruskal_test.cpp): Added comprehensive test cases for Kruskal's algorithm, covering small graphs, disconnected graphs, cycles, and graphs with multiple MSTs.
  • Binary Search Tests (tests/search/binary_search_test.cpp): Added extensive tests for all binary search methods, including edge cases, different data types, and predicate-based searches.

Development Environment:

  • VSCode Settings:
    • Updated .vscode/settings.json to specify clang as the default compiler, set the C++ standard to C++20, and configure IntelliSense mode and include paths.
    • Minor formatting changes in .vscode/c_cpp_properties.json for readability.

…Spanning Tree

feat: add binary search algorithms and comprehensive tests for various data types
@monkey0722 monkey0722 self-assigned this Apr 20, 2025
@monkey0722 monkey0722 merged commit 7c3e098 into main Apr 20, 2025
1 check passed
@monkey0722 monkey0722 deleted the feature/20250420 branch April 20, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants