7 ms·
I found my way into programming via a civil engineering background (lots of GPS and GIS), but I used to be a sysadmin. I also can't invert a binary tree on a wh
by wyclif 7y ago
I found my way into programming via a civil engineering background (lots of GPS and GIS), but I used to be a sysadmin. I also can't invert a binary tree on a whiteboard.
Oh well, I guess I'm not employable! (I'm currently a remote web developer).
- commandlinefan 7y agoWell, since nobody actually knows what "invert a binary tree" means, you've got a reasonable excuse...
- probinso 7y agoI always assumed this meant Allocate an array sized by the number of leaves. Store all leaves. Reverse all pointers. Former head points to null. It's a dumb data structure
- marsrover 7y agoI believe it's more along the lines of just traversing a tree and setting left nodes to the right nodes and vice versa.
- throwaway55554 7y agoIt is. But why "invert" and not "mirror"?
- marsrover 7y agoI agree it's ambiguous wording.