Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tools function bug #1296

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix tools function bug #1296

wants to merge 1 commit into from

Commits on Jun 25, 2019

  1. fix tools function bug

    问题:
    函数getIntersection里,因为循环次数取arr1和arr2长度的最小值,但遍历的是arr2数组,如果arr2的长度大于arr1,则arr2没有被完全遍历,得到的交集不准确
    
    解决:
    固定取arr1的长度为循环次数,遍历arr1,对每个元素判断arr2中是否存在
    shenao1003 committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    993e11f View commit details
    Browse the repository at this point in the history