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

前端 未结 0 634
野趣味
野趣味 2021-02-15 04:45
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          


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