5 kyu
Subsequence Sums II
51 of 55tonylicoding
Loading description...
Mathematics
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Hi, how many perfromance tests are there? It says i've passes 2 out of 2 but still gettin timeout error
oh, I didn't think about telling that in the it block. I'll add the info. There are 100 huge tests
updated. I added an automatic flush of std out when entering a random test batch, so you should now always see some feedback.
Thankyou. Now I can see the feedback. Performance tests are where i'm lacking xd
The solution is smart ... you might consider adding the
maths
tagIt "would be better" to use a function for the random tests and call it with different parameters for each bach, rather than having the same snippet of code duplicated 3 times.
Thanks, it makes everything run much faster too.
That's generally a bad sign... And you effectively forgot to pass the sizes of the arrays as parameters. ;)
I went on rewriting the tests suite further, as well as the description (which was somewhat unreadable, to my taste), before approving it.
cheers
edit: maths notations do not work inside language conditional rendering blocks, unfortunately (see description of the perf tests). I'll ask if that's possible to get this to work.
q
should be eitherqueries
orqs
, in the argumentsWhy 1-based indices in Python?
The typical size of the query array must be given in the description too. As well as the number of tests (preferably telling the number of tests for this or that kinds of inputs sizes).
Sample and fixed tests are not using
it
blocks.Tests should explicitly import test framework and solution.
queries
should be a list of tuples.This comment has been hidden.