In Person with 4 people (~45min each): 1. Check if binary tree A is contained in binary tree B. Write code on paper. 2. Derive a formula for calculating the angle between the hour hand and minute hand in a clock. 3. Design a parking lot. Discuss what data structures to use.
Sigiloso
public static double clockAngle(int hours, int minutes) { double minuteAngle = minutes * 6; double hourAngle = hours * 30 + minutes / 2.0; double result = hourAngle - minuteAngle; if (result < 0) { result += 360; } return result; }