0

I recently came across this game and it is really interesting. https://play.google.com/store/apps/details?id=com.picolaf.liquidsortpuzzle&hl=en_US&gl=US

The goal here is to sort the liquid of all the bottles. I was looking if someone can guide me to what it is called and what should be the algorithm for it?

I figured out few things from the game that I can use for the code..

  1. Use Stack
  2. Cannot Push new element if Limit is reached
  3. Cannot push if not Same color
  4. While Pop if there are more than 1 elements of same color then it should pop all of them
  5. While Pushing if there are more than 1 elements of same color then add all of them
  6. There will be two blank arrays.
  7. If the limit is reached and if all the elements are of same color remove that bottle from the sort list..

Please help and guide me to figure out the algorithm and code for this puzzle. Thanks.

  • 1
    This question should be asked at puzzling.SE or computer science.SE – Philipp Oct 23 '20 at 14:39
  • +1 on Philipp's comment, which I agree with. Further, if you are able to convert the question into a purely mathematical problem, and decide to repost it here please include all necessary information directly in the query, so that mathSE reviewers don't have to go searching for the constraints. Further, it is helpful if extraneous information is omitted from any such query, so that mathSE reviewers can easily focus directly on the mathematical problem. – user2661923 Oct 23 '20 at 15:44
  • What are the rules in this game? I'm not really into installing this app. – Jaroslaw Matlak Feb 01 '21 at 10:31

0 Answers0