Skip to content

Commit 6fd83af

Browse files
authored
Merge pull request #35 from Puneetpotter/patch-1
change `index < totalNumbers` to `index < capacity`. #33
2 parents 7320ee1 + a0ee92a commit 6fd83af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Arrays-Implementation/arrays/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
int get(int index) {
8585
// get the data of the particular index.
86-
if(index > -1 && index < capacity) {
86+
if(index > -1 && index < totalNumbers) {
8787
return arr[index];
8888
}
8989
}

0 commit comments

Comments
 (0)