[Javascript] AREA is NOT an Appropriate Weight!
Here\'s an intuitive thought:\n\n> If rect A is bigger than rect B, it should have a larger weight to get selected.\n> While its # of points are also more, each
Here\'s an intuitive thought:\n\n> If `rect A` is bigger than `rect B`, it should have a larger weight to get selected.\n> While its `# of points` are also more, **each point** within it has a smaller chance for picked then.\n\nSounds fair, but that\'s not completely right.\n.\n\nTaking `rect A`=2x1, `rect B`=1x1 for example:\n\nThough A\'s area is twice as B, there are **6 points in A** while **4 in B**.\nSo the correct ratio should be `(2+1)*(1+1):(1+1)*(1+1)=6:4`\nWhich can then distribute to all points uniformly.\n.\n.\n**Conclusion**\n\nWe should take **\\# OF POINTS** within a rectangle (instead of area) as weight.\n```\nFor size=m*n, there are (m+1)*(n+1) points\nwhich stands for possible choices in X&Y direction.\n```\n\nThanks for your reading and **up-voting** :)\n\n**\u2B50 Check [HERE](https://github.com/Lynn19950915/LeetCode_King) for my full Leetcode Notes ~**\n\n\n\n
['JavaScript']