Hello can someone please let me know how can I improve complexity on this function

前端 未结 0 1868
走了就别回头了
走了就别回头了 2021-02-15 04:25
import unittest

import math


def find(f, y, a, b):
    for n in range(int(a),int(b+1)):
        if f(n) == y:
            return n
    else:
        return -1


class          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题