Category Archives: C

Algo – Linked List

Best Video Explained:

code:

some bugs  here but understood the implementation:

 

Algorithm: Euler’s GCD


code:

more optimized:

 

Recursive:

 

http://www.progkriya.org/gyan/basic-number-theory.html#section3

Algo: Prime factorization of a number

code:

I/O:

 

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

code:

Help can be find:
http://www.studystreet.com/c-program-print-prime-numbers/
http://www.codingalpha.com/prime-number-c-program/
https://en.wikipedia.org/wiki/Primality_test

Algo DS: Circular Queue

 

code:

C++ STL in Bangla

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

 

Data Structure: Queue

Stack VS Queue difference:

 

code:

My implementation:

Another Video:

Code from the video Mycodeschool(Using circular queue):

 

Algorithm: BFS(Breadth First Search)

Theory:

http://scanftree.com/Data_Structure/Breadth-First-Search

Bangla:

গ্রাফ থিওরিতে হাতেখড়ি-৪(ব্রেডথ ফার্স্ট সার্চ)

Video:

code implementation:

Some other links may help:

Breadth First Search Algorithm

code:

Input:

Output:

Another code tried to write from the pseudocode is:

reference from java code: http://www.programmingboss.com/2014/06/breadth-first-search-bfs-in-java.html

ppt slide: https://drive.google.com/file/d/0B0sCkwd_qKgJSzZyUWVYZU5GWlk/edit

Struct Deep Example

code:

struct some other beautiful example:
code:

 

File Handling: Read Content From a Binary File

code:

 

File Handling: Formatted Data Reading and Writing Example

code:

 

File Handling: Fprintf Write Content to a File

code:

 

File Handling: Take formated input from textfile using fscanf() function

code:

output:

frmt.txt

 

Read Content From a File using Fgets

code:

 

Read Content from Text file using C

code: