>

Uol 2025 Wk3 && LeetCode Biweekly Contest 168 Solutions

Weak Vertices The Problem In graph theory, the structural integrity of a network can often be analyzed by identifying fundamental shapes within it, such as triangles. A triangle provides rigidity and is a common motif in many applications. This problem asks us to identify vertices that are not part of any triangle. A vertex i is defined as being part of a triangle if it has two distinct neighbors, j and k, which are also neighbors of each other. Our task is to find all vertices that do not satisfy this condition, which the problem statement refers to as “weak vertices.” The graph is given to us in the form of an adjacency matrix. ...

October 25, 2025 · 56 min · 11743 words · Tategoto Azarasi