pravocodes / Hacktoberfest2024

25 stars 227 forks source link

bug/isfull() #32

Closed pramay88 closed 2 weeks ago

pramay88 commented 2 weeks ago

In your isfull() function, the condition for full stack is top == capacity, but the maximum index for an array in C++ is capacity - 1, so the condition should be top == capacity - 1.