[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Monika-R/LeetCode-Solutions/master/Python/factor-combinations.py [Back]  [Original]

# Time:  O(nlogn)
# Space: O(logn)

class Solution(object):
    # @param {integer} n
    # @return {integer[][]}
    def getFactors(self, n):
        result = []
        factors = []
        self.getResult(n, result, factors)
        return result

    def getResult(self, n, result, factors):
        i = 2 if not factors else factors[-1]
        while i 

Web Proxy Viewer  |  New URL  |  Original Page