Dynamic programming was used to optimize connecting the longest consecutive LEDs sequence to a power sources without wire crossing. The battery board is numbered 1 through N, where N is the number of LEDs. The algorithm used was Longest Common Subsequence (LCS) algorithm between the LEDs sequence and battery numbering.
GUI Details:
- DP Table: Displays the decision-making process and connections.
- Graphical Representation: Offers a visualization to the LED connections( Detailed version for a small number of LEDs and a simpler version for larger numbers of LEDs).