|
|
|
|
|
by LargeTomato
906 days ago
|
|
This was part 1 of a 2 or 3 part question. First we literally iterate through each element, keeping track of the max. I use this question for interns, too, so it's intentionally super easy. It gets harder in part 2. For clarity, the pseudo code solution to the question is for row in a[0]:
for e in row:
max_so_far = max(e, max_so_far)
return max_so_far
No tricks. Just an initial weeder question for interns before we move onto the real question. |
|
Out of pure curiosity, what were the follow up (part 2 and 3) questions? Not looking for a solution, but if you could post the problem statement, it would be very appreciated. If you feel uncomfortable sharing it publicly out of some concern, that’s entirely fair, no worries.