To all the programming geniuses out there

To all the programming geniuses out there.

I have a C programming project i need to finish in a week. Basicly some shitty sorting algorithms but im retarded so cant really program.

For every task you help me with ill buy any steam game for you under $5, do all 6 of them and you get any game under $50. Here are the tasks:

1. Bubble Sort which prints out every iteration.

2. Insertion sort which prints out every iteration.

3. Merge sort that first divides then conquers .

4. Breadt First Search

5. Depth First Search

6. Dijkstra's Algorithm

Good luck boys. Dont forget to bump if you are working on it.

Other urls found in this thread:

steamcommunity.com/id/madmarla
pastebincom/WG1YgigW
c4learn.com/c-programs/program-bubble-sort-elemets-in-c-all.html
hackerrank.com/challenges/insertionsort2
thecrazyprogrammer.com/2014/03/c-program-for-implementation-of-merge-sort.html
youtube.com/watch?v=f6BjBWfy6lY
youtube.com/watch?v=pXQBcuTAF7o
codewithc.com/dijkstras-algorithm-in-c/
steamcommunity.com/id/MrZoombe/
sexychan.site
twitter.com/SFWRedditImages

>paying others to do your homework

also

>implying we believe that you will deliver

Back to this again
Then something else tomorrow
Then law again

I got you fam
steamcommunity.com/id/madmarla

Why are you in programming track if you can't even do simple programming algorithms? It only gets harder from here, if you don't have the time or drive switch to a different major.

C#? If so I have all of these. Sounds like youre doing a similar course to me.

>Breadt First Search
pastebincom/WG1YgigW
steam id: iasatan

This is unrelated to your post. I have a fucking awful time understanding quick sort.

I can program it, i can use it. But i have an awful time wrapping my mind around why it works.

Bubble Sort

#include
#include

void bubble_sort(int[], int);

void main() {
int arr[30], num, i;

printf("\nEnter no of elements :");
scanf("%d", &num);

printf("\nEnter array elements :");
for (i = 0; i < num; i++)
scanf("%d", &arr[i]);

bubble_sort(arr, num);
getch();
}

void bubble_sort(int iarr[], int num) {
int i, j, k, temp;

printf("\nUnsorted Data:");
for (k = 0; k < num; k++) {
printf("%5d", iarr[k]);
}

for (i = 1; i < num; i++) {
for (j = 0; j < num - 1; j++) {
if (iarr[j] > iarr[j + 1]) {
temp = iarr[j];
iarr[j] = iarr[j + 1];
iarr[j + 1] = temp;
}
}

printf("\nAfter pass %d : ", i);
for (k = 0; k < num; k++) {
printf("%5d", iarr[k]);
}
}
}

Insertion sort

#include
#include
#include
#include
#include
void insertionSort(int ar_size, int * ar) {


}
int main(void) {

int _ar_size;
scanf("%d", &_ar_size);
int _ar[_ar_size], _ar_i;
for(_ar_i = 0; _ar_i < _ar_size; _ar_i++) {
scanf("%d", &_ar[_ar_i]);
}

insertionSort(_ar_size, _ar);

return 0;
}

Cool bro's, just gonna post all this shit on turnitin. So this nigga gets done like a dinner.

who hurt you

>inb4 too many lines
Merge sort

#includeint arr[8]={1,2,3,4,5,6,7,8};int main() {int i;merge_sort(arr,0,7);printf("Sorted array:");for(i=0;i

its ok you got $15 now

ok, now you got 4 programs, contact us in steam, and you get the rest

>ayyy too many lines
Breadt First Search

#include#include#include#define MAX 5 struct Vertex{char label;bool visited;};int queue[MAX];int rear=-1;int front=0;int queueItemCount=0;struct Vertex*lstVertices[MAX];int adjMatrix[MAX][MAX];int vertexCount=0;void insert(int data){queue[++rear]=data;queueItemCount++;} int removeData(){queueItemCount--;return queue[front++];} bool isQueueEmpty(){return queueItemCount==0;} void addVertex(char label){struct Vertex*vertex=(struct Vertex*)malloc(sizeof(struct Vertex));vertex->label=label;vertex->visited=false;lstVertices[vertexCount++]=vertex;} void addEdge(int start,int end){adjMatrix[start][end]=1;adjMatrix[end][start]=1;} void displayVertex(int vertexIndex){printf("%c ",lstVertices[vertexIndex]->label);} int getAdjUnvisitedVertex(int vertexIndex){int i;for(i=0;ivisited==false) return i;} return-1;} void breadthFirstSearch(){int i;lstVertices[0]->visited=true;displayVertex(0);insert(0);int unvisitedVertex;while(!isQueueEmpty()){int tempVertex=removeData();while((unvisitedVertex=getAdjUnvisitedVertex(tempVertex))!=-1){lstVertices[unvisitedVertex]->visited=true;displayVertex(unvisitedVertex);insert(unvisitedVertex);}} for(i=0;ivisited=false;}} int main(){int i,j;for(i=0;i

Depth First Search

#include

void DFS(int);
int G[10][10],visited[10],n;

void main()
{
int i,j;
printf("Enter number of vertices:");

scanf("%d",&n);
printf("\nEnter adjecency matrix of the graph:");

for(i=0;i

seems like you want to buy your homework.

I bet your father is a politician

Kek, doing this now

Dijkstra's Algorithm

#include#include#include#include#include#define IN 99#define N 6int dijkstra(int cost[][N], int source, int target);int main(){int cost[N][N],i,j,w,ch,co; int source, target,x,y; printf("\t The Shortest Path Algorithm ( DIJKSTRA'S ALGORITHM in C \n\n"); for(i=1;i< N;i++) for(j=1;j< N;j++) cost[i][j]=IN; for(x=1;x< N;x++){for(y=x+1;y< N;y++){printf("Enter the weight of the path between nodes %d and %d: ",x,y); scanf("%d",&w); cost [x][y]=cost[y][x]=w;}printf("\n");}printf("\nEnter the source:"); scanf("%d", &source); printf("\nEnter the target"); scanf("%d", &target); co=dijsktra(cost,source,target); printf("\nThe Shortest Path: %d",co);}int dijsktra(int cost[][N],int source,int target){int dist[N],prev[N],selected[N]={0},i,m,min,start,d,j; char path[N]; for(i=1;i< N;i++){dist[i]=IN; prev[i]=-1;}start=source; selected[start]=1; dist[start]=0; while(selected[target]==0){min=IN; m=0; for(i=1;i< N;i++){d=dist[start] +cost[start][i]; if(d< dist[i]&&selected[i]==0){dist[i]=d; prev[i]=start;}if(min>dist[i] && selected[i]==0){min=dist[i]; m=i;}}start=m; selected[start]=1;}start=target; j=0; while(start !=-1){path[j++]=start+65; start=prev[start];}path[j]='\0'; strrev(path); printf("%s", path); return dist[target];}

I can send you the un-minified code on Steam

1
c4learn.com/c-programs/program-bubble-sort-elemets-in-c-all.html
2
hackerrank.com/challenges/insertionsort2
3
thecrazyprogrammer.com/2014/03/c-program-for-implementation-of-merge-sort.html
4
youtube.com/watch?v=f6BjBWfy6lY
5
youtube.com/watch?v=pXQBcuTAF7o
6
codewithc.com/dijkstras-algorithm-in-c/

steamcommunity.com/id/MrZoombe/

have fun reading

I don't know why you're using adjacency matrix instead of adjacency list. It's not very efficient that way.

The reason OP is asking for it here is because
P L A G I A R I S M

GCheck best quality pic's try sexychan.site

>adjacency matrix
>not very efficient

Man I'm just here to help OP out and get Planet Coaster on Steam

You really think OP is going to give you steam credits?

Recently graduated from uni, profs said that if they see plagiarism, you get kicked out or some shit.

Always plagiarised on very hard stuff, but changed the names of the variables, names of methods, and changed the indentation and stuff.

Never did get caught.

This doesn't help OP he needs to do shit on his own. When you start doing group work it gets more difficult. I have all 6 algorithm codes, but think OP can do it if he applies himself.

>conio.h
The noose is that way

Mate uts?

Never knew I got trips. Checked.

>but changed the names of the variables, names of methods, and changed the indentation
It means that the profs weren't checking for plagiarism. At least they weren't using MOSS.

MOSS ignores all the whitespaces and you can't beat it by simply changing identifier names, so you just go lucky that your profs weren't serious about plagiarism.

Also, are you OP? If yes, why do you need these programs if you've already graduated from uni. You can find them online anywhere.

Well, considering that you're just 1 university student who has to pass it multiple assignments in a class of 46, you'll immediately realize that checking for plagiarism is not really a fast way to finish things.

Also, no, I'm not OP.

Wow...go sodomise your arse with a cactus.
I was a computer science major and wasn't able to sleep for almost 3 days straight writing my papers and codes. The fear of my works get rejected was almost driving me insane but I pushed myself and hope for the best and it was worth it when I passed knowing it was my own doing. So what the fucking fuck is your excuse for being this lazy (if this was true to begin with) over piety shits like this?
If you can't handle all that, then find another course. Fucking wanker...

I hope you pass every paper, get a masters and a job at EA - just by using Sup Forums for answer. I will have a headless kekoff.

thanks for the homework nerdd.
You're getting shit though

#include
int main() {
int count = 0;
int i;
while (true) {
++count;
if (fork() == 0) {
i = count;
}
}

dude, that's the secret to make your computer faster. We don't give away it so easily

kek

Did you do a compilers course? I still get nightmares of some compilers lab assignments.

Shouldn't it be while(1)? Unless you include .

did op delivered?

No, still don't have Planet Coaster.

not to me, neither

>taking a programming class
>not willing to practice programming
Why are you even there?

lol. expecting op to deliver is like expecting santa to drop off that shiny new 12 gauge you wanted.