The purpose of the assignment is for you to try the trees, not the arrays. I am not sure which one of the lase two numbers is the x dimension change. You said on the web that the binary search tree node should contain two things, x or y and pointer to record. For a binary search tree, it require different element values. They should both be in the structure.
Name is the key which is unique.
After writing four times' projects,I find my improvement is slower. I am really anxious about it. Thank for your class and help. I think I learn much from it. Do not insert a rectangle if there is one already.