Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sonam Dema sohana08

🏠
Working from home
View GitHub Profile
View insertion sort
#include <iostream>
using namespace std;
void insertionSort(int n, int * arr)
{
int temp,i,j,k;
for(i=1;i<n;i++)
{
j=i;
while(j>0 && arr[j]<arr[j-1])
View last occurence
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int m;
cin>>m;
@sohana08
sohana08 / sum of numbers in an array
Created Nov 21, 2016
can anyone help me with the following,how to pass an array as an argument
View sum of numbers in an array
<DOCTYPE! html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
var myarr=[1,2,3,4,5];
function sum(arr) {
var sum1=0;
var length=myarr.length;
@sohana08
sohana08 / to check if a character of string is a vowel or not
Created Nov 20, 2016
i want to check whether a character of a string is a vowel or not but i dont have any idea of it. following is code i have tried of.
View to check if a character of string is a vowel or not
<script>
function checkStr(string1)
{
var vowel_list='aeiouAEIOU';
for(var i=0;i<string1.length;i++)
{
if(string1[i]!==vowel_list
{
return false;
}