华为2020AI工程师实习生面试
1. 写代码题目描述:给定一个5乘5的矩阵,每一行按照从小到大排列,输入一个整数在矩阵中查找,并返回其位置。ju = [[1,10,15,4,7],[8,5,2,19,12],[6,9,16,3,22],[13,14,10,17,24],[21,18,23,30,26]]test = 12i = 0for row in ju: #print(row) i += 1 row.sort() if test in row: print('所在行为:', i