Skip to content

Instantly share code, notes, and snippets.

View jayaprasad37's full-sized avatar

Jayaprasad jayaprasad37

View GitHub Profile
@jayaprasad37
jayaprasad37 / fork-me-fcc-test-suite-template.markdown
Created June 11, 2020 14:02
Fork Me! FCC: Test Suite Template
var bubbles = [];
function setup() {
createCanvas(800, 600);
for(var i=0; i<0; ++i)
{
bubbles[i] = new Bubble(random(750), random(550));
}
@jayaprasad37
jayaprasad37 / shufflingapackofcards.cpp
Created June 21, 2016 18:13
Shuffling a pack of 52 cards
#include <iostream>
#include <string>
#include <ctime>
#include <algorithm>
using namespace std;
void shuffle(int arr[])
{
srand(time(0));
int j=0;
@jayaprasad37
jayaprasad37 / queueimplementationusinglinkedlist.cpp
Created June 21, 2016 18:09
Queue implementation using linked list
#include <iostream>
#include <string.h>
#include <typeinfo>
using namespace std;
struct Node //declaring node
{
int data; //data field in the node
Node* next; //pointer to next node
};
@jayaprasad37
jayaprasad37 / queueimplementationusingarray.cpp
Last active January 31, 2021 18:23
Queue implementation using array
#include <iostream>
#include <string.h>
#include <typeinfo>
using namespace std;
#define MAX 5 //preprossor for array size
int myarray[MAX]; //array for the queue
int count = 0; //count to check the status of the queue
int front =-1; //front index
int rear =-1; //rear index
int isempty() //function to see if the queue is empty or not