Looks like a neat problem, but I have a question on your example solution with no extra numbers: If I'm reading it correctly, there are supposed to be two 4s in the box. Where is the second 4?
Good catch James! Thanks. That was a data entry problem. Should be fixed now.
Nice problem! But I might have some misunderstanding on your problem. My own solution didn't converge on test case 6. Is convergence guaranteed? Could you provide an example solution for test case 6?
Hi Peng, and thanks for the note. I see your solutions now do quite well with all test cases! :-)
Find all elements less than 0 or greater than 10 and replace them with NaN
Word Counting and Indexing
Are you in or are you out?
Number of 1s in a binary string
Sums of Multiple Pairs of Triangular Numbers
Do the line-segments intersect?
Eliminate Polysyllabics: Long live short words!
2048 Next Move
The 17x17 Problem
Twins in a Window
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