Skip to content

Commit a0ee92a

Browse files
authored
change index < totalNumbers to index < capacity.
1 parent 7163983 commit a0ee92a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Arrays-Implementation/arrays/main.cpp

Lines changed: 1 addition & 1 deletion
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)