Array distinct. Arr = map(list). find the smallest element of an array of numbers algorithm. count the number of beautiful subarrays geeksforgeeks.