Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all files from the previous repository #18

Open
wants to merge 229 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
867866e
Add generate-multiplication-table
MuhammedNihad Oct 7, 2020
0c36ad0
Rename generate-multiplication-table to Generate multiplication table…
MuhammedNihad Oct 7, 2020
0c7574d
Update Sum & Avg. of elements of a matrix.c
Deepaksahu-bot Oct 7, 2020
a157186
basica data structure added
akash02ab Oct 7, 2020
9143892
add binary search
rahulSinha-01 Oct 7, 2020
28c3616
Added a file to reverse a doubly linked list
ISHJOT15 Oct 7, 2020
7894ab7
Added revLL.C file
ISHJOT15 Oct 7, 2020
aa87054
Create swayamvar.c
sakshimaslekr Oct 7, 2020
516b9d8
Merge pull request #7 from ISHJOT15/patch-2
AshuKulu Oct 7, 2020
617a713
Merge pull request #6 from ISHJOT15/patch-1
AshuKulu Oct 7, 2020
5c234c3
Merge pull request #5 from rahulSinha-01/main
AshuKulu Oct 7, 2020
e639222
Merge pull request #8 from sakshimaslekr/patch-1
AshuKulu Oct 7, 2020
733d4f0
Merge pull request #4 from akash02ab/main
AshuKulu Oct 7, 2020
3c642ef
Merge pull request #3 from Deepaksahu-bot/main
AshuKulu Oct 7, 2020
fab3c90
Merge pull request #2 from MuhammedNihad/main
AshuKulu Oct 7, 2020
57f76ad
Create quick_sort.c
shihaf Oct 7, 2020
0369319
Create insertionsort.c
Praggya17 Oct 7, 2020
a304d01
Merge pull request #12 from Praggya17/patch-1
AshuKulu Oct 8, 2020
050ecc3
Merge pull request #10 from shihaf/main
AshuKulu Oct 8, 2020
85f9d98
Update README.md
AshuKulu Oct 8, 2020
e44510b
Update README.md
AshuKulu Oct 8, 2020
ffa7c20
Add files via upload
mohakmaheshwari1205 Oct 8, 2020
bd2ba32
Merge pull request #13 from mohakmaheshwari1205/main
AshuKulu Oct 8, 2020
777b415
Circular linked list
mohakmaheshwari1205 Oct 8, 2020
8d6d4a6
Binary Search Tree
ritwiksingh21 Oct 8, 2020
8f93dee
added tower of hanoi program in c language
Yash2rule Oct 8, 2020
b30f29e
Merge pull request #16 from Yash2rule/main
AshuKulu Oct 8, 2020
16931c3
Merge pull request #15 from ritwiksingh21/main
AshuKulu Oct 8, 2020
2abd157
Merge pull request #14 from mohakmaheshwari1205/main
AshuKulu Oct 8, 2020
d3044d9
matrix multiplication for unknown matrix
kri14 Oct 8, 2020
070820e
added java program for selection sort
Yash2rule Oct 8, 2020
1696b79
Create bubble-sort.py
spydermyaan Oct 9, 2020
586f4d2
Create linkedlistcreate.c
vedika1810 Oct 9, 2020
2814f8a
created balancing equation
IndhuR Oct 9, 2020
e7b8288
Added BFS(Breath First Search) Code in C
maulikchavda Oct 9, 2020
d6ab84e
Added Red Black Tree Code in C
maulikchavda Oct 9, 2020
33b7d74
Merge pull request #22 from maulikchavda/main
AshuKulu Oct 9, 2020
5071ce1
Merge pull request #21 from IndhuR/patch-1
AshuKulu Oct 9, 2020
7f4fb23
Merge pull request #20 from vedika1810/main
AshuKulu Oct 9, 2020
3f76248
Merge pull request #19 from spydermyaan/main
AshuKulu Oct 9, 2020
76d5c50
Merge pull request #18 from Yash2rule/main
AshuKulu Oct 9, 2020
0aead71
Merge pull request #17 from kri14/patch-1
AshuKulu Oct 9, 2020
bb09c11
Create function overloading
Ishan-1101 Oct 9, 2020
66f1b26
Added two Searching Algorithms
DeepTalekar Oct 10, 2020
044e1cc
Create Armstrong_number.c
Amit-Sagar Oct 10, 2020
75657ba
Create hactoberfest.html
choudharyrajritu Oct 10, 2020
55e51cf
Create Bit_stuffed_data.c
Sumyak-Jain Oct 10, 2020
80c0039
Create calculator.c
choudharyrajritu1 Oct 10, 2020
f8530cb
Merge pull request #23 from Ishan-1101/main
AshuKulu Oct 10, 2020
21157da
Merge pull request #24 from DeepTalekar/main
AshuKulu Oct 10, 2020
fbbb7c7
Merge pull request #25 from Amit-Sagar/main
AshuKulu Oct 10, 2020
f2a6a30
Merge pull request #26 from choudharyrajritu/main
AshuKulu Oct 10, 2020
f1b6416
Merge pull request #28 from choudharyrajritu1/main
AshuKulu Oct 10, 2020
a180ad3
Merge pull request #27 from Sumyak-Jain/patch-1
AshuKulu Oct 10, 2020
2961dd1
Add files via upload
OarabileMwiya Oct 10, 2020
ad484c9
Create Insert Interval.cpp
kaushikijain Oct 10, 2020
8c120b5
Queue Using Stack in C
maulikchavda Oct 11, 2020
ca3a2ed
create figure.py
the-shyguy Oct 11, 2020
1a54a5c
feat: implementing counting-sort
JakWai01 Oct 11, 2020
b1261a1
feat: implementing merge-sort
JakWai01 Oct 11, 2020
36a757a
Create sieve_of_eratosthenes.py
mdbrnowski Oct 11, 2020
ee72afc
Add Milk scheduling greedy algo from spoj
JahnaviChitta Oct 11, 2020
2e9f5fc
Create fibonacci.py
mdbrnowski Oct 11, 2020
1aa3cdf
Add python code to evaluate post fix expression.
JahnaviChitta Oct 11, 2020
b40ed97
Add cpp code to find the median of incoming nums
JahnaviChitta Oct 11, 2020
9201446
Create corrected_calculator_c
Rupali409 Oct 11, 2020
217573a
Add files via upload
sagarmaheshwari Oct 11, 2020
5250e0c
Create prime_factors.py
mdbrnowski Oct 11, 2020
e9856d7
Create perfect_numbers.py
mdbrnowski Oct 11, 2020
1f5a705
added mergesort.cpp
anvitareddy6 Oct 11, 2020
16a5036
Create Hash.c
srinidh-007 Oct 11, 2020
2da4e5c
Create factorial_java
Sunitha654321 Oct 11, 2020
07e818c
Create Print_Pascal_Triangle_of_size_n.py
srinidh-007 Oct 11, 2020
2ef0276
myPage.html
Aastha479 Oct 11, 2020
2e2f17e
Create Calculator.py
srinidh-007 Oct 11, 2020
b234923
Create Radix_sort.c
srinidh-007 Oct 11, 2020
9990554
Create queue operations.c
Ishan-1101 Oct 11, 2020
1658b0f
Create ReverseAnInteger.c
praddyumnwadekar Oct 11, 2020
6ce33c7
Added sorting algorithm
umangag07 Oct 11, 2020
9ec879b
Added Merge Sort
msameerfarooq Oct 11, 2020
deeaf07
Create Vowel or Consonant using pointers
shreyajadhav Oct 12, 2020
072eac2
Create Bubble Sort using python
gautamjain9615 Oct 12, 2020
1ee7dab
Rename Bubble Sort using python to Bubble_Sort_using_python.py
gautamjain9615 Oct 12, 2020
c51f432
added towerofhanoi cpp program
mtabishk Oct 12, 2020
df439e9
Factors of number
Mathur777 Oct 12, 2020
100cbb8
Merge pull request #59 from Mathur777/main
AshuKulu Oct 12, 2020
713117c
Merge pull request #57 from gautamjain9615/main
AshuKulu Oct 12, 2020
46fd054
Merge pull request #56 from shreyajadhav/main
AshuKulu Oct 12, 2020
2da2d80
Merge pull request #55 from msameerfarooq/mybranch
AshuKulu Oct 12, 2020
c3aa3c7
Merge pull request #54 from umangag07/main
AshuKulu Oct 12, 2020
3516d2b
Merge pull request #53 from praddyumnwadekar/main
AshuKulu Oct 12, 2020
b846f28
Merge pull request #52 from Ishan-1101/main
AshuKulu Oct 12, 2020
1002aa5
Merge pull request #51 from srinidh-007/patch-4
AshuKulu Oct 12, 2020
790b17f
Merge pull request #29 from OarabileMwiya/main
AshuKulu Oct 12, 2020
b4ffb40
Merge pull request #30 from kaushikijain/main
AshuKulu Oct 12, 2020
0f81a6d
Merge pull request #31 from maulikchavda/main
AshuKulu Oct 12, 2020
ca9302c
Merge pull request #33 from Rohit14kvs/patch-1
AshuKulu Oct 12, 2020
99171c7
Merge pull request #35 from JakWai01/main
AshuKulu Oct 12, 2020
1d38055
Merge pull request #37 from michal-dbrnowski/sieve_of_eratosthenes.py
AshuKulu Oct 12, 2020
aa36cfe
Merge pull request #38 from michal-dbrnowski/fibonacci.py
AshuKulu Oct 12, 2020
93a720f
Merge pull request #39 from JahnaviChitta/main
AshuKulu Oct 12, 2020
821cd5e
Merge pull request #41 from Rupali409/main
AshuKulu Oct 12, 2020
96080b7
Merge pull request #42 from sagarmaheshwari/main
AshuKulu Oct 12, 2020
1f6649b
Merge pull request #43 from michal-dbrnowski/prime_factors.py
AshuKulu Oct 12, 2020
98b684a
Merge pull request #44 from michal-dbrnowski/perfect_numbers.py
AshuKulu Oct 12, 2020
0a95aae
Merge pull request #45 from anvitareddy6/new-branch
AshuKulu Oct 12, 2020
b9406be
Merge pull request #46 from srinidh-007/patch-1
AshuKulu Oct 12, 2020
69a9d38
Merge pull request #47 from Sunitha654321/patch-1
AshuKulu Oct 12, 2020
62b4ce1
Merge pull request #48 from srinidh-007/patch-2
AshuKulu Oct 12, 2020
4976b1d
Merge pull request #49 from Aastha479/patch-1
AshuKulu Oct 12, 2020
4832c7b
Merge pull request #50 from srinidh-007/patch-3
AshuKulu Oct 12, 2020
6586039
Create binary-search.cpp
JakWai01 Oct 12, 2020
8e822a4
Create basic-search.cpp
JakWai01 Oct 12, 2020
ff3a59c
fixed that bug
mtabishk Oct 12, 2020
cc410d7
Create Factorial.c
mehulminat Oct 12, 2020
a961ec5
Create Emi calculator.java
mehulminat Oct 12, 2020
50e4e26
Create calculatorv1.c
mehulminat Oct 12, 2020
e8db746
Create Count_sort.py
Rupali409 Oct 12, 2020
1551d14
Create bubblesort.c
Himanshup01 Oct 12, 2020
1d16316
Create Josephus_Problem_Circular_LL.c
ritwiksingh21 Oct 12, 2020
068a633
Merge pull request #65 from Himanshup01/main
AshuKulu Oct 12, 2020
34b7e77
Merge pull request #66 from ritwiksingh21/main
AshuKulu Oct 12, 2020
043dceb
Merge pull request #64 from Rupali409/main
AshuKulu Oct 12, 2020
be0e865
Merge pull request #63 from mehulminat/main
AshuKulu Oct 12, 2020
cd75bd5
Merge pull request #62 from mehulminat/patch-1
AshuKulu Oct 12, 2020
5cf05a5
Merge pull request #61 from JakWai01/main
AshuKulu Oct 12, 2020
221b8f5
Create reverseLinkedList.c
snehasish-20 Oct 12, 2020
28ba211
Merge pull request #67 from snehasish-20/main
AshuKulu Oct 12, 2020
b6df09c
Palindrome number check
aniketbhaleraogithub Oct 12, 2020
709699c
Merge pull request #68 from aniketbhaleraogithub/main
AshuKulu Oct 12, 2020
c88add5
Bubble Sort using recursion in cpp
mtabishk Oct 12, 2020
59bb980
Created basic_searchnumber.py
Rupali409 Oct 12, 2020
cb65729
Created reverse string.py
Rupali409 Oct 12, 2020
05a42a4
program to print maximum frequency element of a tuple.
divyanayak433 Oct 12, 2020
2905330
Merge pull request #71 from Rupali409/main
AshuKulu Oct 12, 2020
76e8a42
Merge pull request #69 from mtabishk/tabish
AshuKulu Oct 12, 2020
3e54b9e
Merge pull request #72 from divyanayak433/main
AshuKulu Oct 12, 2020
b1e0ea5
Merge pull request #58 from mtabishk/tabish-dev
AshuKulu Oct 12, 2020
f0dc099
added bubble sort implemenatation in java
GosiaSo Oct 12, 2020
0f1d4b8
binarySearch
Aaliya1708 Oct 12, 2020
7067183
binaryExponentiation
Aaliya1708 Oct 12, 2020
fb7b75d
Add files via upload
rasikadeshpande24 Oct 12, 2020
c1823c0
Merge pull request #77 from rasikadeshpande24/main
AshuKulu Oct 13, 2020
a0bcf27
Merge pull request #76 from Aaliya1708/main
AshuKulu Oct 13, 2020
c871d8b
Merge pull request #73 from GosiaSo/bubbleSortJava
AshuKulu Oct 13, 2020
5316147
create palindrome_number.c
pal-gupta97 Oct 13, 2020
7fab52c
Merge pull request #78 from pal-gupta97/main
AshuKulu Oct 13, 2020
028de18
Create quick_sort.py
Danialmonachan11 Oct 13, 2020
b928adc
Create palindrome.py
Danialmonachan11 Oct 13, 2020
93a0003
Client server model project
pycrash Oct 13, 2020
8493cd2
Sorted the Programs
vinothgokul Oct 13, 2020
ad7055b
Linked List and it's ADT
komalmahto Oct 13, 2020
525fec6
All Stack Operations
komalmahto Oct 13, 2020
3ff2ca5
Added the BMI Calculator
ron2111 Oct 13, 2020
df7faf8
Add files via upload
aaryantyagi182 Oct 13, 2020
bc38334
create matrix_transpose.cpp
pal-gupta97 Oct 13, 2020
3405494
Fix:badge
gihantha Oct 13, 2020
0adff28
Fix-badge
ISHHMadushanka Oct 13, 2020
dd29ae6
Merge pull request #1 from gihantha/main
ISHHMadushanka Oct 13, 2020
4cc6b7b
Create Remove_whiteSpace_from_string.c
sritabh Oct 13, 2020
74ef31b
Create decimaltobinary.c
pal-gupta97 Oct 13, 2020
db27aca
added blanced brackets
Oct 13, 2020
71d7166
Program to covert infix to postfix
akanksha470 Oct 13, 2020
11e1a87
added stack implementation using linked list
sidtirkey Oct 13, 2020
088c348
Added JumpSearch using java
Adhikaribharath Oct 13, 2020
765aa30
Add files via upload
sidtirkey Oct 13, 2020
2e195e8
Recursion
praj12-sys Oct 13, 2020
cfcd39c
Recursion
praj12-sys Oct 13, 2020
337f536
Insertion Sort in JAVA added
Kapadiatathya Oct 13, 2020
690a9c1
add factorial in C#
psaswata07 Oct 13, 2020
91239ce
Create DFStraversal.c
pruthviishere Oct 13, 2020
42be830
Create esibe.html
vani-gold Oct 13, 2020
f6ebb7a
file sorting
Oct 13, 2020
feba3a7
sorted unlabeled
Oct 13, 2020
1d907dc
Merge pull request #110 from Jonathanvanhaaften/file-sorting
AshuKulu Oct 14, 2020
02907ed
Merge pull request #107 from vani-gold/main
AshuKulu Oct 14, 2020
041445f
Merge pull request #101 from psaswata07/psaswata07-factorial-C#
AshuKulu Oct 14, 2020
38198cc
Added python game
arpitsomani8 Oct 16, 2020
2099bf5
Merge pull request #204 from arpitsomani8/main
AshuKulu Oct 17, 2020
89a30e1
Added Queue using Stacks without pointers
barawalojas Oct 17, 2020
73645a9
Create heap_sort.cpp
Aadityajain75 Oct 17, 2020
d65dffd
Create launch.json
nimishh7 Oct 17, 2020
a06e0dc
Algoritmo numeros primos
Juanandresfl Oct 17, 2020
59a8c5f
Merge pull request #79 from Danialmonachan11/main
AshuKulu Oct 18, 2020
a3b04fb
Merge pull request #80 from pycrash/pycrash
AshuKulu Oct 18, 2020
52d60fd
Merge pull request #82 from vinothgokul/g_branch
AshuKulu Oct 18, 2020
ad04692
Merge pull request #83 from komalmahto/main
AshuKulu Oct 18, 2020
9cddd0a
Merge pull request #84 from ron2111/patch-1
AshuKulu Oct 18, 2020
e7d446e
Merge pull request #85 from aaryantyagi182/main
AshuKulu Oct 18, 2020
b4ad942
Merge pull request #86 from pal-gupta97/main
AshuKulu Oct 18, 2020
a1c29fd
Merge pull request #87 from SobyDamn/patch-1
AshuKulu Oct 18, 2020
01917a1
Merge pull request #88 from ISHHMadushanka/main
AshuKulu Oct 18, 2020
d295f33
Merge pull request #89 from harshit3199/main
AshuKulu Oct 18, 2020
a90665e
Merge pull request #94 from akanksha470/main
AshuKulu Oct 18, 2020
ec9ce12
Merge pull request #95 from Adhikaribharath/main
AshuKulu Oct 18, 2020
df0cc49
Merge pull request #96 from sidtirkey/main
AshuKulu Oct 18, 2020
8ba71a6
Merge pull request #99 from praj12-sys/main
AshuKulu Oct 18, 2020
b64a10c
Merge pull request #100 from Kapadiatathya/main
AshuKulu Oct 18, 2020
ed234d9
Merge pull request #102 from pruthviishere/main
AshuKulu Oct 18, 2020
c1588f3
Merge pull request #267 from Juanandresfl/main
AshuKulu Oct 18, 2020
4a4ed3c
Merge pull request #266 from nimishh7/patch-1
AshuKulu Oct 18, 2020
c4a3830
Merge pull request #265 from Aadityajain75/patch-1
AshuKulu Oct 18, 2020
2561ab0
Merge pull request #264 from barawalojas/main
AshuKulu Oct 18, 2020
cd6b0c2
infix to posfix expression convertor
miyatrayash Oct 20, 2020
2be8796
Merge pull request #343 from proquicklearner/main
AshuKulu Oct 20, 2020
260062a
Circular Queue
debanjana2000 Oct 20, 2020
95e4e96
Stack using array
debanjana2000 Oct 20, 2020
b93f36e
Queue using array
debanjana2000 Oct 20, 2020
e7c1ff3
Create calculator.cpp
Alibaba1697 Oct 22, 2020
815d0c8
Merge pull request #346 from debanjana2000/patch-3
AshuKulu Oct 23, 2020
2940f98
Merge pull request #345 from debanjana2000/patch-2
AshuKulu Oct 23, 2020
f006ff5
Merge pull request #344 from debanjana2000/patch-1
AshuKulu Oct 23, 2020
bf18393
Merge pull request #371 from Alibaba1697/patch-1
AshuKulu Oct 23, 2020
6c40c5e
Add files via upload
AVS18 Oct 24, 2020
6ae6bf1
Delete django.zip
AVS18 Oct 24, 2020
7879561
Add files via upload
AVS18 Oct 24, 2020
b1dc12c
Add files via upload
AVS18 Oct 24, 2020
2be2191
Add files via upload
AVS18 Oct 24, 2020
1670775
Create Readme.md
AVS18 Oct 24, 2020
0006c1d
Add files via upload
bedank15012 Oct 24, 2020
9474882
Merge pull request #399 from bedank15012/main
AshuKulu Oct 25, 2020
61c0a14
Merge pull request #390 from AVS18/main
AshuKulu Nov 22, 2020
f44615a
Update README.md
AshuKulu Jan 31, 2021
ae40245
Updated README.md
asmitbm Sep 11, 2021
0586dc3
Merge pull request #478 from Asmit2952/patch-1
AshuKulu Sep 12, 2021
e779d71
Update README.md
AshuKulu Sep 12, 2021
3b471c3
Update README.md
AshuKulu Sep 12, 2021
6bbc492
Update README.md
AshuKulu Sep 12, 2021
3789b13
Added A Menu Driven Linked List Program
phenyloder Oct 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Area.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include<stdio.h>
int main() {
int rad; float PI = 3.14;
float area, ci;
printf("\nEnter radius of circle: ");
scanf("%d", &rad);
area = PI * rad * rad;
printf("\nArea of circle : %f ", area);
ci = 2 * PI * rad;
printf("\nCircumference: %f ", ci);
return (0);
}
20 changes: 20 additions & 0 deletions BMI Calculator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
print(' BMI CALCULATOR')
name = input('What is your name?')
weight = float(input('What is your weight (in Kgs)?'))
height = float(input('What is your height (in meters)?'))
bmi = weight / (height ** 2)

if bmi<18.5:
print(f"\n{name} is underweight by {bmi} BMI")
print('Eat foods containing high portion of fats and carbohydrates')
elif 18.5<bmi<24.9:
print(f"\n{name} has normal weight by {bmi} BMI")
print('You are living a healthy life and !!!KEEP IT UP!!!')
elif 25.0<bmi<29.9:
print(f"\n{name} is overweight by {bmi} BMI")
print('\nEat foods containing less amount of fats and carbohydrates and do regular exercise.')
else:print(f"\n{name} is obese by {bmi} BMI.\nRegular exercise is very important for you & consult a dietician to plan your diet.")
print('\n |||||||||| THANK YOU ||||||||||')



19 changes: 19 additions & 0 deletions C/Armstrong_number.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include<stdio.h>
int main()
{
int n,r,sum=0,temp;
printf("enter the number=");
scanf("%d",&n);
temp=n;
while(n>0)
{
r=n%10;
sum=sum+(r*r*r);
n=n/10;
}
if(temp==sum)
printf("armstrong number ");
else
printf("not armstrong number");
return 0;
}
174 changes: 174 additions & 0 deletions C/BFS.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
#include<stdio.h>
#include<stdlib.h>

#define MAX 100

#define initial 1
#define waiting 2
#define visited 3

int n;
int adj[MAX][MAX];
int state[MAX];
void create_graph();
void BF_Traversal();
void BFS(int v);

int queue[MAX], front = -1,rear = -1;
void insert_queue(int vertex);
int delete_queue();
int isEmpty_queue();

int main()
{
create_graph();
BF_Traversal();
return 0;
}

void BF_Traversal()
{
int v;

for(v=0; v<n; v++)
state[v] = initial;

printf("Enter Start Vertex for BFS: \n");
scanf("%d", &v);
BFS(v);
}

void BFS(int v)
{
int i;

insert_queue(v);
state[v] = waiting;

while(!isEmpty_queue())
{
v = delete_queue( );
printf("%d ",v);
state[v] = visited;

for(i=0; i<n; i++)
{
if(adj[v][i] == 1 && state[i] == initial)
{
insert_queue(i);
state[i] = waiting;
}
}
}
printf("\n");
}

void insert_queue(int vertex)
{
if(rear == MAX-1)
printf("Queue Overflow\n");
else
{
if(front == -1)
front = 0;
rear = rear+1;
queue[rear] = vertex ;
}
}

int isEmpty_queue()
{
if(front == -1 || front > rear)
return 1;
else
return 0;
}

int delete_queue()
{
int delete_item;
if(front == -1 || front > rear)
{
printf("Queue Underflow\n");
exit(1);
}

delete_item = queue[front];
front = front+1;
return delete_item;
}

void create_graph()
{
int count,max_edge,origin,destin;

printf("Enter number of vertices : ");
scanf("%d",&n);
max_edge = n*(n-1);

for(count=1; count<=max_edge; count++)
{
printf("Enter edge %d( -1 -1 to quit ) : \n",count);
scanf("%d %d",&origin,&destin);

if((origin == -1) && (destin == -1))
break;

if(origin>=n || destin>=n || origin<0 || destin<0)
{
printf("Invalid edge!\n");
count--;
}
else
{
adj[origin][destin] = 1;
}
}
}

/* ""OUTPUT""
Enter number of vertices : 9
Enter edge 1( -1 -1 to quit ) :
0
1
Enter edge 2( -1 -1 to quit ) :
0
3
Enter edge 3( -1 -1 to quit ) :
0
4
Enter edge 4( -1 -1 to quit ) :
1
2
Enter edge 5( -1 -1 to quit ) :
3
6
Enter edge 6( -1 -1 to quit ) :
4
7
Enter edge 7( -1 -1 to quit ) :
6
4
Enter edge 8( -1 -1 to quit ) :
6
7
Enter edge 9( -1 -1 to quit ) :
2
5
Enter edge 10( -1 -1 to quit ) :
4
5
Enter edge 11( -1 -1 to quit ) :
7
5
Enter edge 12( -1 -1 to quit ) :
7
8
Enter edge 13( -1 -1 to quit ) :
-1
-1
Enter Start Vertex for BFS:
0
0 1 3 4 2 6 5 7 8

*/
98 changes: 98 additions & 0 deletions C/Binary_Search.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#include<stdio.h>
#include<stdlib.h>

void binarySearch(int searchValue, int a[], int n);

void selectionSort(int a[], int n)
{
int i, j, minimunIndex, temp;

printf("Just started to sort Using the Selection Sort Algorithm\n");
// Started Sorting Using Selection sort
for ( i = 0; i < n; i++)
{
minimunIndex = i;

for ( j = i + 1; j < n; j++)
{
if (a[minimunIndex] > a[j])
minimunIndex = j;
}
temp = a[i];
a[i] = a[minimunIndex];
a[minimunIndex] = temp;
}
// Now the Array has been sorted in Ascending Order
printf("Ended Sorting using Selection Sort\n");
}


void main()
{
int length, i, searchValue;
printf("Welcome to the Binary Search!!\n");
printf("You can search the data element from an array, don't worry I will do it for you\n");
printf("For simplicity here the data elements are considered as integers\n");
printf("So let me know how many integers you want:\n");
scanf("%d", &length);

// Creating an array using calloc i.e. array for the user defined length
int *a = (int *) calloc (length, sizeof(int));

// Accepting the data elements for the array
printf("Please enter the integers now:\n");
for ( i = 0; i < length; i++)
{
scanf("%d", &a[i]);
}

// Accepting the Value to be searched
printf("Please enter the value you want me to search for:\n");
scanf("%d", &searchValue);

// Binary Search needs the sorted array as input without which the search can't occur
// Hence sorting elements before the Search
selectionSort(a, length);
// Implementing the Binary Search on the Sorted Array
binarySearch(searchValue, a, length);

printf("Thanks for Investing time in Me!!");
}

void binarySearch(int searchValue, int a[], int n)
{
int middle, first, last;
first = 0; // First initalized to the first position of the array
last = n-1; // Last initialized to the last position of the array

middle = first + last / 2; // Middle position of the array is calculated using this formula

printf("Starting to search the Data element --> %4d\n", searchValue);
// Search until the last element is greater then equal to the first element
while( first <= last)
{
// If the searched value is greater then the element at the middle position modify the first position to the upper half of the array
if(a[middle] < searchValue)
first = middle + 1;

// Also check if the the element at the middle position is equal to the searched value
else if(a[middle] == searchValue)
{
printf("The element %d was found at the location %d starting from 0\n", searchValue, middle);
break;
}
// If the searched value is lesser then the element at the middle position modify the last position to the lower half of the array
else
last = middle - 1;

middle = first + last / 2;
}

// If first becomes greater then the last position in the array then the element is not at all found in the array
if (first > last)
{
printf("Sorry the element you wanted me to Search doesn't exist in the given array\n");
}

printf("Just Ended Binary Search\n");
}
26 changes: 26 additions & 0 deletions C/Bit_stuffed_data.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// data communiction and networking Bit Stuffed data algorithm implemented
#include "stdio.h"
int main()
{
int i=0,c=0;
char data[100];
printf("Enter the data: ");
scanf("%s",data);
printf("\nBit Stuffed Data \n");
printf("01111110");
for(i=0;data[i]; i++)
{
if(data[i]=='1')
c++;
else
c=0;
printf("%c",data[i]);
if(c==5)
{
printf("0");
c=0;
}
}
printf("01111110");
return 1;
}
Loading