- 2
Problem statement : Write a programme to calculate the number of close loop and open loop. Language- python Sample example
Test Case 1. L1 = [P1,P2] T = [ Lo, ……… ,Ln ] P = (x,y) T = [[19, 30, 269, 30], [19, 280, 19, 30], [269, 280, 19, 280], [269, 30, 269, 280]] Output = 1 Test Case 2. L1 = [P1,P2] T = [ Lo, ……… ,Ln ] P = (x,y) T = [[243, 254, 43, 254], [43, 254, 43, 54], [43, 54, 243, 54], [243, 54, 243, 254], [18, 29, 268, 29], [18, 279, 18, 29], [268, 279, 18, 279], [268, 29, 268, 279]] Output = 2 Test Case 3. L1 = [P1,P2] T = [ Lo, ……… ,Ln ] P = (x,y) T = [[243, 254, 43, 254], [43, 254, 43, 54], [43, 54, 243, 54], [243, 54, 243, 254], [18, 29, 268, 29], [18, 279, 18, 29], [268, 279, 18, 279]]
3 Réponses
+ 2
require more explanation about close loop and open loop definitions
and also please try and share where you were not able to understand.
+ 1
i think we need to use a graph ds...
find cycles for closed loops...
0
There are set of points and we have to find number of loop forms