leetle

Daily challenge for 2026-08-15

592. Count Bidirectional Edges

You are given a list of directed edges representing connections in a network, where each element is a pair [u, v] indicating a one-way connection from node u to node v. A bidirectional connection exists between two nodes if there is a directed edge from u to v and another from v to u. Return the total number of unique bidirectional connections in the network.

Example:
Input: edges = [[0,1], [1,0], [2,3]]
Output: 1

Run this challenge interactively in Python or JavaScript when the app loads.