GATE CSE
First time here? Checkout the FAQ!
x
0 votes
62 views

How Can (C) see be answer? stack index starts from 1. I think answer should be S[Top - i] <0 then it will be an underflow.

please check and answer.

closed as a duplicate of: Programming stack
asked in DS by Veteran (14.6k points)  
closed by | 62 views
I think none should be the answer here... how can we check underflow condition with stack value... it should be "top - i < 0" condition not S[top-i]<0 --> here S[top-i] can give unexpected results.


Top Users Mar 2017
  1. rude

    4018 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2606 Points

  5. Debashish Deka

    2092 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1318 Points

  8. Bikram

    1218 Points

  9. Akriti sood

    1166 Points

  10. Sanjay Sharma

    1004 Points

Monthly Topper: Rs. 500 gift card

21,439 questions
26,753 answers
60,919 comments
22,929 users