https://ide.geeksforgeeks.org/D9cz2UzYhd----what’s the error in the code, there is no output
Playing with cards (in stack)
hey @AbhishekAhlawat1102
5 1
3 4 7 6 5
q=1
your for loop
for (int i = 1; i < q; i++) { // The loop will never run
i m not able to figure out the correction to make i know what error you are pointing to but i don’t know how to correct it can u please suggest the correction
@AbhishekAhlawat1102
you are doing .
Stack z = new Stack<>();
Main m = new Main();
for(int i = 1; i< q; i++){ loop will never run
Stack a = new Stack<>();
Stack b = new Stack<>();
int item = z.pop(); // Stack already Empty h