2 stacks for queue stuck in code


Please check is the written code correct or not and also im stuck in WRITING TOP FUNCTION im not able to understand top function please help me with code

Also please check the pop() is it correct??

there are many mistakes in your code
i have modified your code
take a look

Modified Code

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning: