Data Structured65_q2a_no_move

2: Vector No Move

ee749af8-0617-4468-8c73-59564cb939de.cppC++
1// Loading code...

Selected Submission

100 / 100
0.63s
8120 KB
ArrayOther
Time Comp.
O(log n) for operator[] due to upper_bound, O(1) for expand_hook
Space Comp.
O(n) for mData and O(k) for aux, where k is the number of segments
Readability
6/10

"The code implements a custom vector-like data structure that avoids moving elements when expanding capacity. It utilizes an auxiliary vector `aux` to keep track of segment boundaries, effectively creating a segmented array."

History

AttemptPoints Time
Try #610010/6/2024
Try #510010/6/2024
Try #4010/6/2024
Try #3010/6/2024
Try #2010/6/2024
Try #1010/6/2024