Kind of tailored to the orders of magnitude approach of the test suite; complexity would have to increase significantly if you split the intervals say [10000 50000] instead of [1e4 1e5-1].
Everything is perfect in this code.
this is not really a general solution, perhaps you could add more complicated cases in the testsuite? for example pandigital_nb(2200,4000)==10, pandigital_nb(250,40000)==98, pandigital_nb(35327,43854637)==23030
I hesitated to add tests that I can't solve by myself.
I see, check solution 443089, that should be a general and relatively fast solution
Make a Palindrome Number
Get the area codes from a list of phone numbers
Number of Circles in a Number
Output any real number that is neither positive nor negative
Create a two dimensional zero matrix
What is the scope of variables in Matlab ?
Pandigital number n°3 (Inspired by Project Euler 32)
Mirror, mirror on the wall, who is fairest of them all?
Decrypt the cypher using XOR encryption (for beginners)
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office