From d6332a088de73401d5daeade65589604f7aba8d6 Mon Sep 17 00:00:00 2001 From: Dhruvi Agrawal <60813752+dhruviagrawal@users.noreply.github.com> Date: Sat, 20 Mar 2021 18:59:37 +0530 Subject: [PATCH] Arrays Minimum no. of Jumps to reach end of an array --- MinimumJumps.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MinimumJumps.cpp b/MinimumJumps.cpp index 999399f..018f8fe 100644 --- a/MinimumJumps.cpp +++ b/MinimumJumps.cpp @@ -1,6 +1,7 @@ #include using namespace std; +//Complexity O(n) int minJumps(int a[],int n) { if(a[0]==0) return -1; @@ -41,4 +42,4 @@ int main() for(int i=0;i>a[i]; int result=minJumps(a,n); -} \ No newline at end of file +}