We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defsuper_reduced_string(s):# Complete this functionns2=[]foriins:iflen(ns2)==0:ns2.append(i)elifns2[-1]==i:ns2.pop()else:ns2.append(i)iflen(ns2)==0:return"Empty String"return''.join(ns2)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Super Reduced String
You are viewing a single comment's thread. Return to all comments →
My solution in python