Prerequisite:
Reverse First K elements of Queue using STACK | Python | Castor Classes
https://www.youtube.com/watch?v=gqIA2...
Python for beginners:
https://www.youtube.com/watch?v=egq7Z...
Code: def reverse(string): #Add code here stack=[]; for i in string: stack.append(i); s=""; i=0; while(i<len(string)): s=s+stack.pop(-1); i=i+1; return s;
Telegram: https://t.me/clcoding_python
https://www.facebook.com/pirawenpython/
https://www.facebook.com/groups/pirawenpython/
Code: def reverse(string): #Add code here stack=[]; for i in string: stack.append(i); s=""; i=0; while(i<len(string)): s=s+stack.pop(-1); i=i+1; return s;
Telegram: https://t.me/clcoding_python
https://www.facebook.com/pirawenpython/
https://www.facebook.com/groups/pirawenpython/
0 Comments:
Post a Comment