Domanda di colloquio di Amazon

Find the missing numbers between smallest and largest element in the array.

Risposte di colloquio

Anonimo

30 mar 2019

reverse the value stored in int type.

Anonimo

1 mag 2020

list_a = [1, 23, 12, 98, 30, 2, 50] for i in range(int(len(list_a))): for j in range(i): if list_a[j] > list_a[j+1]: x = list_a[j] list_a[j] = list_a[j+1] list_a[j+1] = x print (list_a[0],list_a[int(len(list_a)-1)]) for i in range(list_a[0],list_a[int(len(list_a)-1)]): print (i)