Ad
  • Custom User Avatar

    'heaven' and 'java' have 'av' in common, there are 4 letters different (h removed, both 'e's changed, n removed)
    'heaven' and 'php' have only 'h' in common, there are 6 letters different (p added, e changed, a,v,e,n removed)

  • Custom User Avatar

    Explain please why findMostSimilar("heaven"): expected 'php' to equal 'java'

    That answer doesn't have any logic

  • Custom User Avatar

    that will expect false, not true.

    Here are the tests:

    o1 = {name: 'Joe', surname: 'Smith'};
    o2 = {name: 'Joe', surname: 'Smith'};
    Test.assertEquals(deepCompare(o1,o2), true, 'should handle objects');
    
    o1 = {name: 'Joe', surname: 'Smith'};
    o2 = {surname: 'Smith', name: 'Joe'};
    Test.assertEquals(deepCompare(o1,o2), true, 'property order should not matter');
    
    o1 = {name: 'Joe', surname: 'Smith'};
    o2 = {name: 'Joe'};
    Test.assertEquals(deepCompare(o1,o2), false, 'should detect when a property is missing');
    Test.assertEquals(deepCompare(o2,o1), false, 'should detect when a property is missing');
    
  • Custom User Avatar

    Why compare two of this objects must return true??
    { name: 'Joe' } { name: 'Joe', surname: 'Smith' }

  • Custom User Avatar

    Interested kata with non-linear solution. +rep

  • Custom User Avatar

    Good kata. Thanks!

  • Custom User Avatar

    Good kata