On Friday, April 12, 2019 at 2:06:36 PM UTC-5, ACTECH wrote: > Thanks again for your time and if you could suggest some test cases where you > might think my code could be vulnerable that will be great, > Regards, > Ayan
Hi Ayan, The following test case (which was already posted) demonstrates one problem with your code for Cryptopangrams: 101 32 6 6 6 6 4 6 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403 The correct answer is "AAABCDEFGHIJKLMNOPQRSTUVWXYZ", but both of the solutions you posted print "CBCBCAEAEBODPFQGRHSITJUKVLWMXNYOZ" instead. You weren't alone in making this mistake, so don't feel too bad; if you browse through the other Cryptopangrams threads, you'll find explanations of what the problem is and how to fix it. In one of your threads you also mentioned encountering runtime errors. Here's a test case I just came up, with which demonstrates one issue with your code: 101 27 4 4 6 15 35 77 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 4087 4757 5183 5767 6557 7387 8633 9797 The correct answer for this test case is "AAABCDEFGHIJKLMNOPQRSTUVWXYZ". One of your solutions handles this case correctly, but the other crashes with "IndexError: list index out of range". Finally, as mentioned in the first thread, your code for "Foregone Solution" returns a negative number for the input "40", which is not a valid output. Hope this helps, -- David -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/a05145c4-d403-4ad2-ac42-975d0b7f7baa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
