« first day (1566 days earlier)      last day (1270 days later) » 

5:34 AM
The thing that's LIFO about the call-stack are whole stack-frames. Not individual objects inside a stack-frame
most objects inside the stack frame are just accessed as base+offest. When you use godbolt you can see that as "mov rax, qword ptr [rsp + 56]" all over the place (either rsp or rbp, depending on compiler settings)
 
 
9 hours later…
3:02 PM
am i right in saying that for this version of binary search if you use unsorted 1,...n it will only work if the element you are looking for is the first element to pivot from?
 

« first day (1566 days earlier)      last day (1270 days later) »