Exactly same as but problem was framed in different way: https://leetcode.com/problems/move-pieces-to-obtain-a-string/description/
Follow up: What if pieces can go out of scope of array?
intialState: "_ L _ L L _ R L _ R R R _"
targetState: "_ _ _ _ L _ R L _ _ _ _ R"
output: true
Was able to solve first part
For follow up told that we can remove the chunk of L's from beginning and same for R's from end. And check the middle part using original problem.
He told it is not necessary that pieces will be removed.
I mean we need to track indexes.
Time was over.
Will I get call for onsites?
Edit: I was rejected. Reason given was that he gave hints ( he just told one edge case, which i think was even mentioned as edge case because problem statement was not explained precisely, that too was discussed before writing the code. My code covered all edge cases in first run.)
Anyways, they wont even match my current base, forget about my base after appraisel.