All the new coders here there is a very good link of tutorial posted by karan on quora:
click
I also got abort in 3 cases and have absolutely no idea what went wrong (Index surely were in bounds)
Yeah even I tried to use this formula. Wasted time trying in Python 3 and then I realised the pre-written code in IDE was wrong. It was expecting the function to return array of integers whereas we needed to display just the number of possible combinations .
There was one test case no 3 that was not working for me in problem number one
Yeah even I faced the same issue
Answer to What is the number of ways to distribute 8 identical balls in 3 different boxes, none being empty? by Anuj Mishra https://www.quora.com/What-is-the-number-of-ways-to-distribute-8-identical-balls-in-3-different-boxes-none-being-empty/answer/Anuj-Mishra-6?ch=2&share=0227438d&srid=zHgC
Read 2nd paragraph
what was the corner case in problem.Any Idea?
Plus sign??
5 -10 7
-7 -12 -12
5 5 6
In this senario 41 is answer instead of 36.
then why plus sign??
I know the platform but really hate the interface . also unaware how to solve in practice llike cf and others…
any idea what the test case 3 was for the first question? also i was getting timeout in the second question, i was caculating the prime factors and then applying the stars and bars second formula.
For first problem you should consider the case when (n<=1).
And for 2nd problem you may be use sieve algorithm for fast calculation of prime factor.
what should be the output when n<=1? there was nothing mentioned in the post? was -1 to be returned?
Learn to learn and modify.
That case n<=1 was incorrect in test data itself imo.
Google beggars formula.
Nope 3 test cases shows “aborted”.
Still no idea why.
It was not wrong answer definitely.
Same here. One possibility is test cases were incorrect or Main function had issues.
Because n<=1 case was also incorrect in 1st problem.
I got AC.
if(n<=1)
return input_list;
IMO n=0 should return given vector itself.
And n=1 should return vector having one element = 1
Same here. Cuz test cases were incorrect.