mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update return
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
parent
80da46c3c0
commit
3ef35382a9
@ -21,7 +21,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief This function implements the above algorithm
|
* @brief This function implements the above algorithm
|
||||||
* @param array of numbers containing the maximum jump (in steps) from that index
|
* @param array of numbers containing the maximum jump (in steps) from that index
|
||||||
* @return returns bool value whether final index can be reached or not
|
* @returns bool value whether final index can be reached or not
|
||||||
*/
|
*/
|
||||||
bool canJump(std::vector<int> nums) {
|
bool canJump(std::vector<int> nums) {
|
||||||
auto lastPos = nums.size() - 1;
|
auto lastPos = nums.size() - 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user