Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kaitenague/algorithms-cpp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: TheAlgorithms/C-Plus-Plus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 19 commits
  • 64 files changed
  • 11 contributors

Commits on May 19, 2025

  1. Configuration menu
    Copy the full SHA
    c26eea8 View commit details
    Browse the repository at this point in the history
  2. Update merge_sort.cpp (TheAlgorithms#2818)

    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    jiya10208 and realstealthninja authored May 19, 2025
    Configuration menu
    Copy the full SHA
    3f6876f View commit details
    Browse the repository at this point in the history
  3. docs: add time and space complexity to quick_sort.cpp (TheAlgorithms#…

    …2819)
    
    * Complexity quick_sort.cpp
    
    Space Complexity
    Time complexity
    
    * Update sorting/quick_sort.cpp
    
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    
    * Update sorting/quick_sort.cpp
    
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    jiya10208 and realstealthninja authored May 19, 2025
    Configuration menu
    Copy the full SHA
    da53b26 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2025

  1. Configuration menu
    Copy the full SHA
    93a700c View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2025

  1. Couple of issues and areas for improvement. (TheAlgorithms#2841)

    1. Typographical Error in Doxygen Comment
    
    In the Doxygen comment at the beginning of the file, "Merege Sort" should be corrected to "Merge Sort".
    
    2. Merging Logic
    
    In the merge function, the merging logic can lead to out-of-bounds access if both sub-arrays have been completely traversed. The condition in the while loop should ensure that you only access elements of L and R if they are within bounds:
    
    3. Memory Management
    
    Using new and delete[] for the temporary arrays (L and R) is fine, but you can also use std::vector from the C++ Standard Library to simplify memory management:
    
    4. Input Validation
    
    You should consider adding input validation when reading the number of elements and the actual elements to avoid undefined behavior.
    
    5. Main Function Improvements
    
    You can also enhance the main function by encapsulating the input logic in a separate function, improving readability.
    
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    pipinstallaadit and realstealthninja authored Jul 9, 2025
    Configuration menu
    Copy the full SHA
    f1eddf4 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2025

  1. Configuration menu
    Copy the full SHA
    3f0409d View commit details
    Browse the repository at this point in the history
  2. style: remove unused variables (TheAlgorithms#2946)

    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    vil02 and realstealthninja authored Aug 14, 2025
    Configuration menu
    Copy the full SHA
    d4962c3 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2025

  1. style: remove unused params of main (TheAlgorithms#2948)

    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    vil02 and realstealthninja authored Aug 15, 2025
    Configuration menu
    Copy the full SHA
    fb27d4d View commit details
    Browse the repository at this point in the history
  2. Fixed name space problem by removing using namespace std (TheAlgorith…

    …ms#2966)
    
    Co-authored-by: FuelTheBurn <richarddasunboss@gmail.com>
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    3 people authored Aug 15, 2025
    Configuration menu
    Copy the full SHA
    13306be View commit details
    Browse the repository at this point in the history
  3. style: resolve -Wreorder (TheAlgorithms#2950)

    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    vil02 and realstealthninja authored Aug 15, 2025
    Configuration menu
    Copy the full SHA
    6568ab9 View commit details
    Browse the repository at this point in the history
  4. chore: sort subdirectories (TheAlgorithms#2949)

    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    vil02 and realstealthninja authored Aug 15, 2025
    Configuration menu
    Copy the full SHA
    e9caade View commit details
    Browse the repository at this point in the history
  5. chore: try to comply to C++20 (TheAlgorithms#2978)

    * chroe: add cstdint
    
    * fix: remove <> from explicit function
    realstealthninja authored Aug 15, 2025
    Configuration menu
    Copy the full SHA
    79aeaa9 View commit details
    Browse the repository at this point in the history
  6. feat: implement optimized two-pointer approach for trapping rainwater (

    …TheAlgorithms#2975) (TheAlgorithms#2976)
    
    * feat: optimize trapping rainwater
    
    * incorporate changes
    
    ---------
    
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    kanavgoyal898 and realstealthninja authored Aug 15, 2025
    Configuration menu
    Copy the full SHA
    145111c View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2025

  1. Configuration menu
    Copy the full SHA
    6393130 View commit details
    Browse the repository at this point in the history
  2. docs: update DIRECTORY.md (TheAlgorithms#2980)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    3 people authored Aug 16, 2025
    Configuration menu
    Copy the full SHA
    a77ce5c View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2025

  1. Configuration menu
    Copy the full SHA
    93c64b5 View commit details
    Browse the repository at this point in the history
  2. feat: add algorithm to find the number of paths in a graph using DFS (T…

    …heAlgorithms#2815)
    
    * feat: add count_paths algorithm with a test case
    
    * fix: updated number_of_paths algorithm, added more test cases, and set unsigned int as parameter
    
    * fix: replaced unsigned int with std::uint32_t for fixed size
    
    * fix: Handled empty graph, invalid input and added test cases for the same
    
    * clang-format and clang-tidy fixes for 80e27ba
    
    ---------
    
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    3 people authored Aug 17, 2025
    Configuration menu
    Copy the full SHA
    b30bdd3 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2025

  1. Configuration menu
    Copy the full SHA
    c917fc4 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2025

  1. chore: make acceleration due to gravity a constexpr (TheAlgorithms#2982)

    * Added constexpr GRAVITY constant (9.80665) as per guidelines
    
    * Merge branch 'master' into feature/add-gravity-constant
    
    * Update physics/ground_to_ground_projectile_motion.cpp
    
    Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
    
    * Merge branch 'master' into feature/add-gravity-constant
    kaushalsawariya authored Aug 19, 2025
    Configuration menu
    Copy the full SHA
    c39d84b View commit details
    Browse the repository at this point in the history
Loading