Python Forum
Where is the loophole in my code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where is the loophole in my code
#14
OP = original post.
Too many students say they're not students, so we have to assume it, please don't take it personally :)
(Even if it's on Leetcode, someone could have assigned it.)

As for the failure - as mentioned, your code is inefficient. It's quadratic where linear solutions are possible (some of us have been PMing them for fun, and someone else posted a spoiler that was deleted). This may be why it's failing, if you're confident that the logic is correct. It looks fine to me.

If you don't know what I'm talking about, try start here and if you still have questions feel free to post them on this thread and we'll help you optimize your solution.
Reply


Messages In This Thread
Where is the loophole in my code - by landlord1984 - Jan-22-2017, 04:05 AM
RE: Where is the loophole in my code - by Mekire - Jan-22-2017, 04:40 AM
RE: Where is the loophole in my code - by micseydel - Jan-22-2017, 05:53 AM
RE: Where is the loophole in my code - by wavic - Jan-22-2017, 07:09 AM
RE: Where is the loophole in my code - by Mekire - Jan-22-2017, 07:11 AM
RE: Where is the loophole in my code - by Ofnuts - Jan-24-2017, 08:59 AM
RE: Where is the loophole in my code - by Mekire - Jan-24-2017, 11:01 AM
RE: Where is the loophole in my code - by hsunteik - Jan-24-2017, 11:22 AM
RE: Where is the loophole in my code - by Mekire - Jan-24-2017, 11:40 AM
RE: Where is the loophole in my code - by micseydel - Jan-24-2017, 06:34 PM
RE: Where is the loophole in my code - by Ofnuts - Jan-24-2017, 09:34 PM
RE: Where is the loophole in my code - by micseydel - Jan-24-2017, 09:37 PM
RE: Where is the loophole in my code - by micseydel - Jan-27-2017, 12:42 AM
RE: Where is the loophole in my code - by micseydel - Jan-27-2017, 01:02 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020