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 getYear(srkrData): | |
years={} | |
for s in srkrData: | |
year=s.split("\t")[2]; | |
if(years.has_key(year)==True): | |
yearCount=years[year] | |
yearCount=yearCount+1 | |
years[year]=yearCount; | |
else: | |
years[year]=1 |
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
#include <stdio.h> | |
int length(char *str) | |
{ | |
int i=0; | |
while(*str!='\0') | |
{ | |
i++; | |
str++; | |
} | |
return i; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int lsearch(int *arr,int length) | |
{ | |
int i; | |
for(i=0;i<length;i++) | |
if(arr[i]==0)return i+1; | |
} | |
int main() |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
int *arr=(int *)malloc(20*sizeof(int)),count[3]={0},n,i,j; | |
printf("enter n:"); | |
scanf("%d",&n); | |
for(i=0;i<n;i++) | |
{ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
int arr[50],i,n,sum=0; | |
scanf("%d",&n); | |
for(i=0;i<n;i++) | |
{ | |
scanf("%d",&arr[i]); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
void reverse(int *arr,int start,int end) | |
{ | |
int temp,i,j; | |
for(i=start,j=end;i<j;i++,j--) | |
{ | |
temp=arr[i]; | |
arr[i]=arr[j]; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int partition(int *arr,int low,int high) | |
{ | |
int j,pivot,i,temp; | |
pivot=arr[low]; | |
i=low+1; | |
j=high-1; | |
do{ | |
while(arr[i]<pivot)i++; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int who_alive(int n,int k) | |
{ | |
unsigned int mask=0x01,i=1,alived; | |
mask=mask<<7; | |
n=n<<k; | |
while((n&mask)==0) | |
{ | |
mask=mask>>1; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bootstrap Example</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<style> |
OlderNewer