From 639b3ac5774345910f9bd009f8ace73d2d5414ee Mon Sep 17 00:00:00 2001 From: Rakshaa Viswanathan <46165429+rakshaa2000@users.noreply.github.com> Date: Wed, 2 Sep 2020 22:42:31 +0530 Subject: [PATCH 1/2] Author_edit_Update greedy_algorithms/jumpgame.cpp Co-authored-by: David Leal --- greedy_algorithms/jumpgame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/greedy_algorithms/jumpgame.cpp b/greedy_algorithms/jumpgame.cpp index fbe4020c4..2d729786b 100644 --- a/greedy_algorithms/jumpgame.cpp +++ b/greedy_algorithms/jumpgame.cpp @@ -4,7 +4,7 @@ * \details * This algorithm is a greedy algorithm. * This solution takes in input as a vector and output as a boolean to check if you can reach the last position. - * @author rakshaa2000 + * @author [Rakshaa Viswanathan](https://github.com/rakshaa2000) */ //Jump Game: /*Given an array of non-negative integers, you are initially positioned at the first index of the array. From 11e9823558369a7440f17699a608bb6870dcfe88 Mon Sep 17 00:00:00 2001 From: Rakshaa Viswanathan <46165429+rakshaa2000@users.noreply.github.com> Date: Wed, 2 Sep 2020 22:43:02 +0530 Subject: [PATCH 2/2] main_func_Update greedy_algorithms/jumpgame.cpp Co-authored-by: David Leal --- greedy_algorithms/jumpgame.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/greedy_algorithms/jumpgame.cpp b/greedy_algorithms/jumpgame.cpp index 2d729786b..6f7a2dd18 100644 --- a/greedy_algorithms/jumpgame.cpp +++ b/greedy_algorithms/jumpgame.cpp @@ -32,6 +32,10 @@ bool canJump(std::vector nums) { return lastPos == 0; } +/** + * @brief Main function + * @returns 0 on exit + */ int main(){ //Sample test case std::vector num={4,3,1,0,5};