Return to Video

Number of Tests - Software Debugging

  • 0:00 - 0:05
    Removing any of these subsets will result in a passing test,
  • 0:05 - 0:11
    which means that we again have to increase the granularity by doubling n in here.
  • 0:11 - 0:14
    Now we split the input into six subsets,
  • 0:14 - 0:18
    resulting in six more attempts to remove individual parts--
  • 0:18 - 0:20
    all of them will pass --
  • 0:20 - 0:23
    and then we have to increase the granularity again, which would be 12.
  • 0:23 - 0:26
    But now our input only has 8 characters,
  • 0:26 - 0:29
    and we can't split an 8 character input into 12 subsets
  • 0:29 - 0:32
    unless these subsets would be empty.
  • 0:32 - 0:36
    So we're going to fix this a bit by setting up this minimum function over here.
  • 0:36 - 0:40
    We make sure that n cannot grow beyond the size of the input,
  • 0:40 - 0:43
    which means that in our case n would now be 8.
  • 0:43 - 0:46
    This is the final stage of delta debugging
  • 0:46 - 0:50
    where it tries to remove one character after another,
  • 0:50 - 0:53
    but all of these removals result in passing test cases,
  • 0:53 - 0:56
    so what we get in the end is this very string
    4 Udacity Robot
    3 Udacity Robot
    2 fabio
    1 Amara Bot