Ad
  • Custom User Avatar

    Needs random tests.

  • Custom User Avatar

    Kata is stuck in Node 8.

  • Default User Avatar

    It's really not clear what you were asking for. For a given network (defined by the original IP and subnetmask), you want us to partition that IP space into smaller subnets with number of hosts in each subnet.

    You said the Number of Hosts will not always be valid, but it would have been more helpful to say, if you cannot make subnets with exactly number of hosts then we should use the smallest possible subnets that hold at least that many hosts.

    It'd also help if you gave an example of a network which is partitioned into more than 1 subnet.

    Also, for your test cases, look into using Test.assertSimilar and you won't have to use JSON.stringify on all of the values.