Interview Guides

Given two axis-aligned 3D bounding boxes, implement a function that returns their Intersection over Union (IoU) as a floating-point number. Each box is represented as [x1, y1, z1, x2, y2, z2], where (x1, y1, z1) is the minimum corner and (x2, y2, z2) is the maximum corner.
x1 <= x2, y1 <= y2, z1 <= z2 for each box-10^6 to 10^6