Data Structured62_q1b_grandfather

Grandfather

d15a9abf-6581-4046-b8c4-b304a77532e7.cppC++
1// Loading code...

Selected Submission

100 / 100
0.11s
13120 KB
HashMapOther
Time Comp.
O(R + I * G)
Space Comp.
O(R + I * G)
Readability
7/10

"The code utilizes maps to store relationships between people (father-son) and their grandparents. Sets are used to store the grandparents of each person and to find the intersection of grandparent sets for two individuals."

History

AttemptPoints Time
Try #51008/20/2024
Try #4608/20/2024
Try #3608/20/2024
Try #2308/20/2024
Try #108/20/2024