To calculate the total resistance of a circuit represented by an adjacency list of resistors, you'll need to traverse the graph and compute the total resistance based on whether the resistors are connected in series or parallel. For series connections, you sum the individual resistances, while for parallel connections, you use the parallel resistance formula. You can use DFS or BFS to traverse the graph and calculate the total resistance for each path.
For a detailed solution, check this article : https://khobaib529.medium.com/solving-electrical-circuits-a-graph-based-algorithm-for-resistance-calculations-921575c59946