Skip to content

Commit 3b8dbf0

Browse files
committed
Fix #2
1 parent 7267e8c commit 3b8dbf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/partition_problem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace dp {
4949
* @param size Size of the vector.
5050
* @returns @param bool whether the vector can be partitioned or not.
5151
*******************************************************************************/
52-
bool findPartiion(std::vector<uint64_t> &arr, uint64_t size) {
52+
bool findPartiion(const std::vector<uint64_t> &arr, uint64_t size) {
5353
uint64_t sum = std::accumulate(arr.begin() , arr.end() , 0); // Calculate sum of all elements
5454

5555
if (sum % 2 != 0) return false; //if sum is odd, it cannot be divided into two equal sum

0 commit comments

Comments
 (0)