Logic Builders are puzzles that you can implement in the programming language of your choice. Do one puzzle every week and you will certainly improve your programming skills many fold. IMPORTANT: Do not stop at thinking the logic. Implement the solution. That’s the most important part.
Problem 1: Arrange the circles
You will be given four value pairs. The first letter indicates the circle color and the next the quadrant in which it needs to be placed. The origin (0,0 position) of the plane on the whole screen will be specified by the fifth argument. You have to then arrange the four circles in appropriate quadrant.
Example input:
R4
G3
Y2
B1
23,45
Refer to the image to see an example of how the circles would be arranged.