[Bug] answers are wrong for Test cases


#1

[Bug] question as “Given a String of small characters , iteratively remove consecutive characters which comes just one after another alphabetically, starting from the front.”

Your test cases :- abcdlxyzmno
expected output : empty string ’

can u explain how?

similarly,
Your test cases :- acfhijgdecuwxz
expected output : acuz


#2

May I ask, which puzzle you are talking about?
This one: link? Or this? Or another?
In case you rephrased the task, can you remember a word from the statement, so I can search for it? I get 0 hits for “iteratively”.


#3

Neither of your link is my question … actually i got this ques while giving coding round for a company held on cdoing game link.


#4

Based upon the examples you have given, it is just a matter of removing consecutive alphabetical characters until that is no longer possible. The operative word is iterative. They could perhaps have been clearer in stating one consecutive string per iteration (and substring > 1) but that follows from the test cases. This definitely is not a bug, but rather you misunderstanding intent from what I can see.
abcdlxyzmno
lxyzmno
lmno
thus empty string

acfhijgdecuwxz
acfgdecuwxz
acdecuwxz
acuwxz
leaving acuz