vmware onsite question (medium-hard imo)
Anonymous User
859

Given a source string and a destination string which is an anagram of the source string. Give the combinations of stack operations in the form of string so that it reaches the destination String.

push -> "i"
pop -> "o"

Example: for source "poo" and destination "oop", the correct combinations will be [iiiooo, iioioo]. To make a valid combination, number of push(s) should be equal to pop(s).

 public List<String> getSolution(String src, String dst) {
 
 }
Comments (2)