785-Is-Graph-Bipartite
Sat 17 May 2025
https://leetcode.com/problems/is-graph-bipartite
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
from enum import Enum
class Color(Enum):
kWhite = 0
kRed = 1
kGreen = 2
class Solution:
def isBipartite(self, graph: List[List[int]]) -> bool:
colors = [Color.kWhite] * len(graph)
for i in …Category: leetcode
Read More