mirror of
https://github.com/mudabbir-ahmad/Leet-Code-prog.git
synced 2026-10-08 02:30:21 +00:00
fix: add dereference comment for max_element usage in candies solution
This commit is contained in:
1 parent
ad9dad2f8b
commit
e9cadfe0a4
1 file changed
+1
-1
@@ -4,7 +4,7 @@ public:
|
|||||||
int csize = candies.size();
|
int csize = candies.size();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int current;
|
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<bool> kids;
|
vector<bool> kids;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user