GATE CSE
First time here? Checkout the FAQ!
x
0 votes
56 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 (11.7k points)  
closed by | 56 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.

Related questions

Top Users Jan 2017
  1. Debashish Deka

    7906 Points

  2. Habibkhan

    4736 Points

  3. Vijay Thakur

    4474 Points

  4. sudsho

    4318 Points

  5. saurabh rai

    4200 Points

  6. Arjun

    3638 Points

  7. Bikram

    3494 Points

  8. santhoshdevulapally

    3470 Points

  9. GateSet

    3228 Points

  10. Sushant Gokhale

    3116 Points

Monthly Topper: Rs. 500 gift card

18,944 questions
23,897 answers
52,113 comments
20,213 users