This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"fmt" | |
"os/exec" | |
"os" | |
"sync" | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*PROGRAM TO INSERT AN ELEMENT TO THE ARRAY IN THE INDEX 0 ,-1 AND ANY LOCATION GIVEN */ | |
#include<stdio.h> | |
int main(){ | |
int arr[100],size=5; | |
for(int i=0;i<5;i++){ | |
scanf("%d",&arr[i]); | |
} | |
int key,pos; | |
printf("\nEnter the number to be inserted and the psoition to be inserted : "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def umm(list1): | |
list1.sort(reverse=True) | |
sum = 0 | |
diff = list1[0] | |
li = [] | |
new = [] | |
for i in range(0, len(list1)): | |
sum += list1[i] | |
new.append(sum) | |
for i in range(0, len(list1)-1): |