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.
The wording of this problem is very poor.
For example, "Take any two adjacent distinct characters.."
What does it mean to be adjacent? Are letters adjacent if they are next to each other in the english alphabet?
Or does adjacent mean every two distinct characters next to each other in the input string?
If so, how does the given example make sense:
"For the second case, one optimal solution is: bcab -> aab -> ac ->b..." after aab-> ac, where does the 'c' character come from? It wasn't in the input of 'aab'
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
String Reduction
You are viewing a single comment's thread. Return to all comments →
The wording of this problem is very poor. For example, "Take any two adjacent distinct characters.."
What does it mean to be adjacent? Are letters adjacent if they are next to each other in the english alphabet? Or does adjacent mean every two distinct characters next to each other in the input string? If so, how does the given example make sense: "For the second case, one optimal solution is: bcab -> aab -> ac ->b..." after aab-> ac, where does the 'c' character come from? It wasn't in the input of 'aab'