I created a list like this:
n = [0,0,0,0,0]
now I want to add [100] at index [1,2,3]. so list will become like this -
n = [0,100,100,100,0]
another example: adding[200] at index [3,4], list will become-
n = [0,100,100,300,200]
We can do this by using loops, but using loops it will take O(n) time. I want to know can we add a value at multiple index of a list without using loops?