Skip to content
DeepForgeby svx
All problems
EasyComputer Visioncv-132

Zip Boxes with Scores

Problem

Pair each box with its score.

Return a list where element i is [x1, y1, x2, y2, score] built from boxes[i] and scores[i]. Empty inputs return [].

Test cases

case 1
in: [[[0,0,2,2],[1,1,3,3]],[0.9,0.5]]
expected: [[0,0,2,2,0.9],[1,1,3,3,0.5]]
case 2
in: [[[1,2,3,4]],[0.25]]
expected: [[1,2,3,4,0.25]]
case 3
in: [[],[]]
expected: []
Starter codePython
def zip_boxes_scores(boxes, scores):
    # Your code here
    pass

3 test cases · run your code against them in the editor