Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Return Type of main and Logic Errors in dequeue #1560

Open
shrivalidutt opened this issue Oct 6, 2024 · 1 comment
Open

Incorrect Return Type of main and Logic Errors in dequeue #1560

shrivalidutt opened this issue Oct 6, 2024 · 1 comment

Comments

@shrivalidutt
Copy link

The main function should have a return type of int, not void. This is important because it indicates the exit status of the program to the operating system.
In dequeue, the for loop to transfer elements from stack1 to stack2 doesn't handle the scenario where count is 0 properly.

@harshgsharma1501
Copy link

Please assign this to me!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants