From e9cadfe0a41c4cf5b69ab16408c2403adf517db5 Mon Sep 17 00:00:00 2001 From: mudabbir-ahmad Date: Wed, 6 May 2026 18:41:01 +0100 Subject: [PATCH] fix: add dereference comment for max_element usage in candies solution --- Easy/kids_with_greatest_number_of_candies_1431/Solution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Easy/kids_with_greatest_number_of_candies_1431/Solution.cpp b/Easy/kids_with_greatest_number_of_candies_1431/Solution.cpp index ac3f590..69593a0 100644 --- a/Easy/kids_with_greatest_number_of_candies_1431/Solution.cpp +++ b/Easy/kids_with_greatest_number_of_candies_1431/Solution.cpp @@ -4,7 +4,7 @@ public: int csize = candies.size(); int i = 0; int current; - int max = *std::max_element(candies.begin(), candies.end()); + int max = *std::max_element(candies.begin(), candies.end()); // needs the *std to dereference the iterator returned by max_element (From algo library. Gets max val from the vector) vector kids;