Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You are given the s s and t. Both strings have the same length.
- You are allowed to modify s. In each step you may choose two valid indices i and j such that i > j, and change s[i] to s[j]. For example, if s = "abc", you may choose i=2 and j=0, which will change s to "aba".
- Return "Possible" (quotes for clarity) if you can change s into t by a sequence of zero or more steps. Otherwise, return "Impossible".
- Note that the return values are case-sensitive.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement