Ad
  • Custom User Avatar

    the thief is greedy, not the algorithm. you need to find the optimal solution

  • Custom User Avatar

    Why do you wanna use chatgtp for katas ???

  • Custom User Avatar

    It is the perimiter of the land. for every block that is attatched perimiter is +2. When it is the end/start block it is +3.

    [
    [X X X O O X],
    [O X X X O X]
    ]

    The first 6 X's has a perimiter of 12 because 3 top, 3 bottom, 2 left, 2 right, and a displacement of 2 center (because they
    are shifted).

    maybe use a loop, put all X's in a multi dimensional array, use list length to calculate for top, excess or lack of X for center, and len of the overall list to calculate sides. and you would probably have to make sure the X's are connected

  • Default User Avatar

    See the image, you'll see the path to solution.. best of luck

  • Default User Avatar

    I also cant figure it out.
    Did you figure out how they get 24 and 18 from those pictures?

  • Custom User Avatar

    Do you see the image? Count the yellow segments, the unit is one grid.