Category: Language

03
Jun
2017

Algo: Prime factorization of a number

code: #include<bits/stdc++.h> int main() { int i,n,ct=0;; scanf(“%d”,&n); for(i=2;i<=sqrt(n);i++) { if(n%i==0) { ct=0; while(n%i==0) { n=n/i; ct++;…

02
Jun
2017

Prime Number: Trial division | Prime check upto N in C

code: #include<bits/stdc++.h> int main() { int i,j,n,flag=0; printf(“enter number: “); scanf(“%d”,&n); for(i=2;i<=n;i++) //first iterate upto n {…

31
May
2017

Algo DS: Circular Queue

  code: #include<stdio.h> #define size 4 int q[size]; int rear=-1; int front=-1; Enqueue(int item){ if((rear+1)%size==front){ printf(“Queue Overflow\n”);…

28
May
2017

C++ STL in Bangla

https://tanvir002700.wordpress.com/2016/04/15/c-stl-tricks1/  

26
May
2017

Data Structure: Queue

Stack VS Queue difference:   code: /* * C Program to Implement a Queue using an Array…

26
May
2017

Algorithm: BFS(Breadth First Search)

Theory: http://scanftree.com/Data_Structure/Breadth-First-Search Bangla: গ্রাফ থিওরিতে হাতেখড়ি-৪(ব্রেডথ ফার্স্ট সার্চ) Video: code implementation: Some other links may help: http://theoryofprogramming.com/2014/12/25/breadth-first-search-algorithm/…