def minCostII(self, costs):
        if not costs:
            return 0
        
        n = len(costs)
        k = len(costs[0])
        min_cost = [costs[0], [0] * k]
        for i in xrange(1, n):
            smallest, second_smallest = float("inf"), float("inf")
            for j in xrange(k):
                if min_cost[(i - 1) % 2][j] < smallest:
                    smallest, second_smallest = min_cost[(i - 1) % 2][j], smallest
                elif min_cost[(i - 1) % 2][j] < second_smallest:
                    second_smallest = min_cost[(i - 1) % 2][j]
            for j in xrange(k):
                min_j = smallest if min_cost[(i - 1) % 2][j] != smallest else second_smallest
                min_cost[i % 2][j] = costs[i][j] + min_j

        return min(min_cost[(n - 1) % 2])
Checks the given path for the last exported comment's id
dataset/ETHPy150Open kamyu104/LeetCode/Python/paint-house-ii.py/Solution2.minCostII--crossover with--dataset/ETHPy150Open arthurk/django-disqus/disqus/management/commands/disqus_export.py/Command._get_last_state