Skip to content

Instantly share code, notes, and snippets.

View rubykar's full-sized avatar

Ruby Kar rubykar

  • Siliguri,WestBengal
  • 03:18 (UTC -12:00)
View GitHub Profile
package main
import(
"fmt"
"os/exec"
"os"
"sync"
)
/*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 : ");
@rubykar
rubykar / ummm.py
Last active January 11, 2022 20:17
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):