denomination of list =[1,2,5,10,20,50,100,200,500] output = 451 write a program to least number of combination of output for example 451 = 200*2+50*1+1*1 = so there is 4 denomination please provide solution this is cgi interview question
# We want square of only for odd no. in final list from given list nums = [ 5, 3, 8, 11, 6 ] filtered_obj = list(filter(lambda x: x%2!=0, nums)) mapped_obj = list(map(lambda x: x**2, filtered_obj)) print(mapped_obj) # Using List-Comprehension [i**2 for i in nums if i%2!=0]
Thank you
Sir please make videos on dsa with python.. ur videos r superb👍🏻
Thank you and I will surely work on DSA
Sir binary search tree in data structure with python ka video hai kya sir
No
denomination of list =[1,2,5,10,20,50,100,200,500] output = 451 write a program to least number of combination of output for example 451 = 200*2+50*1+1*1 = so there is 4 denomination please provide solution this is cgi interview question
# We want square of only for odd no. in final list from given list
nums = [ 5, 3, 8, 11, 6 ]
filtered_obj = list(filter(lambda x: x%2!=0, nums))
mapped_obj = list(map(lambda x: x**2, filtered_obj))
print(mapped_obj)
# Using List-Comprehension
[i**2 for i in nums if i%2!=0]