Ad
  • Default User Avatar

    It's working now! Thanks very much.

  • Default User Avatar

    Haha, left isNothing in from debugging it months ago :) Completely useless now thankfully

  • Default User Avatar

    Your first haskell test case is wrong. The tree looks like this


    2
    8 3
    9 1 4 5

    (Just (TreeNode {
    left = Just (TreeNode
    {left = Just (TreeNode
    {left = Nothing,
    right = Nothing,
    value = 9}),
    right = Just (TreeNode
    {left = Nothing,
    right = Nothing,
    value = 1}),
    value = 8}),
    right = Just (TreeNode
    {left = Just (TreeNode
    {left = Nothing,
    right = Nothing,
    value = 4}),
    right = Just (TreeNode
    {left = Nothing,
    right = Nothing,
    value = 5}),
    value = 3}),
    value = 2}))

  • Default User Avatar

    manhattanDistance( [1, 1], [1, 1] ) => returns 0

    should be manhattanDistance (1,1) (1,1)
    etc.