def solve(self, cipher):
        """
        Turan's Graph:

        :param cipher: the cipher
        """
        N, M = cipher
        # K_{r+1} free
        # r = 2
        # edge_cnt = 0
        # while edge_cnt<M:
        # edge_cnt = self.Turan(N, r)
        #     r += 1
        #
        # return r-1


        # binary search
        # T(n, r) <= M
        # T(n, r+1) >M
        low = 0
        high = N
        while low + 1 < high:
            mid = (low + high) / 2
            r = self.Turan(N, mid)

            if r < M:
                low = mid
            else:
                high = mid
        return high
dataset/ETHPy150Open algorhythms/HackerRankAlgorithms/Clique.py/Solution.solve/original