pop 13

1018. Find the smallest integer in the array

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: # 1 def find_smallest_int(arr): return sorted(arr, reverse=True).pop() # 2 def find_smallest_int(arr): r..

0825. Find the first non-consecutive number

Your task is to find the first element of an array that is not consecutive. By not consecutive we mean not exactly 1 larger than the previous element of the array. E.g. If we have an array [1,2,3,4,6,7,8] then 1 then 2 then 3 then 4 are all consecutive but 6 is not, so that's the first non-consecutive number. If the whole array is consecutive then return null2. The array will always have at leas..