Re:X.ai: $6B Series B
by belter on Monday May 27, 2024 @02:40AM
(#40488268)
Your technical interview is way too easy....
[ Parent
| on HN ]
Re:X.ai: $6B Series B
by DoctorDabadedoo on Monday May 27, 2024 @03:30AM
(#40488515)
Indeed, please write an algorithm to reverse a linked list in O(1).
Assuming I can choose linked list implementation, that is trivial:
It's a doubly linked list where the head contains a pointer to the tail, and a flag that determines which pointer in the nodes is forward and which is backward.