Skip to content

Instantly share code, notes, and snippets.

View 78526Nasir's full-sized avatar
🎯
Focusing

Nasir Islam Sujan 78526Nasir

🎯
Focusing
View GitHub Profile
@78526Nasir
78526Nasir / SquareNumbers.c
Created April 26, 2016 14:29
11461 - Square Numbers !
#include<stdio.h>
#include<math.h>
int main()
{
int first,second,value,count,i;
while(scanf("%d %d",&first,&second))
{
if(first==0 && second==0)
break;
@78526Nasir
78526Nasir / BanglaNumbers.c
Created April 23, 2016 04:23
10101 Bangla Numbers !
/// 10101 Bangla Numbers ///
#include<stdio.h>
void bangla(long long int );
int main()
{
long long int n;
int c=1;
@78526Nasir
78526Nasir / LongestIncreasingSubsequence.c
Created April 22, 2016 13:46
longest Increasing Sub sequence in C !
/// longest Increasing Subsequence ///
#include<stdio.h>
#define max 100
main()
{
int arr[max],len[max],i,j,n,LIS;
printf("Enter the no of Elements :");
scanf("%d",&n);
@78526Nasir
78526Nasir / BreadthFirstSearch(WUG).c
Last active April 22, 2016 13:48
Breadth First Search for weighted undirected graph !
/// Breadth First Search for weighted undirected graph !
#include <stdio.h>
#include <stdlib.h>
#define max 20
int queue[max];
int front,rear;
@78526Nasir
78526Nasir / DepthFirstSearch.c++
Last active April 22, 2016 13:49
Depth First Search Implementation in C++ !
/// Depth First Search Implementation in C++ ///
#include<iostream>
#include<stdio.h>
#define max 20
int stack[max];
int top;
void DFS(int arr[][max],int,int);
@78526Nasir
78526Nasir / BreadthFirstSearch.c
Last active April 22, 2016 13:49
Breadth First Search Implementation in C !
/// Breadth First Search Implementation in C ///
#include<stdlib.h> // this header file is needed for exit function
#include<stdio.h>
#define max 20
int queue[max];
int front,rear;
int BFS(int arr[][max],int ,int);
@78526Nasir
78526Nasir / 3n+1.c
Created March 10, 2016 11:24
Solution of the 3n+1 problem !
// The 3n+1 problem //
#include<stdio.h>
long long count(long long n){
long long c;
c=1;
while(n>1){
if(n%2!=0){
n=(3*n)+1;
@78526Nasir
78526Nasir / BinarySearch.c
Created February 18, 2016 08:17
Binary Search Implementation in C
/// Binary Search ///
#include<stdio.h>
main()
{
int a[]={1,2,3,4,5,6,7,8,9,10},i,start,end,mid,item;
printf("Enter a item to Search:");
scanf("%d",&item);
start=0;
end=9;
@78526Nasir
78526Nasir / LinearSearch.c
Created February 18, 2016 08:01
Linear Search Implementation in C
/// linear search ///
#include <stdio.h>
main()
{
int a[100],i,n,pos=0,item;
printf("Enter How many elements on your Array: ");
scanf("%d",&n);
printf("\nEnter %d elements values : ",n);
for(i=0;i<n;i++)
@78526Nasir
78526Nasir / InsertionSort.c
Created February 17, 2016 13:35
Insertion Sort implementation in C using Array !
/// Insertion Sort ///
#include<stdio.h>
main()
{
int a[100],i,value,hole,n;
printf("Enter how many elements on your Array :");
scanf("%d",&n);
printf("\nEnter %d values :",n);
for(i=0;i<n;i++)