首页 > 其他分享 >Find the smallest integer in the array

Find the smallest integer in the array

时间:2023-03-14 10:34:24浏览次数:50  
标签:Given return smallest integer array your

Instructions
Given an array of integers your solution should find the smallest integer.
For example:

  • Given [34, 15, 88, 2] your solution will return 2
  • Given [34, -345, -1, 100] your solution will return -345

You can assume, for the purpose of this kata, that the supplied array will not be empty.
Solution

def find_smallest_int(arr):
   return min(arr)

标签:Given,return,smallest,integer,array,your
From: https://www.cnblogs.com/artwalker/p/17214001.html

相关文章